Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Pandas Loves Ponies
Search
lexual
July 05, 2013
Technology
0
250
Pandas Loves Ponies
Pandas do love ponies.
Talk about getting Django & Pandas code working together.
lexual
July 05, 2013
Tweet
Share
More Decks by lexual
See All by lexual
Salt: How To Be Truly Lazy
lexual
1
250
Other Decks in Technology
See All in Technology
LINEスキマニにおけるフロントエンド開発
lycorptech_jp
PRO
0
330
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
2
370
社外コミュニティで学び社内に活かす共に学ぶプロジェクトの実践/backlogworld2024
nishiuma
0
260
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
Postman と API セキュリティ / Postman and API Security
yokawasa
0
200
Microsoft Azure全冠になってみた ~アレを使い倒した者が試験を制す!?~/Obtained all Microsoft Azure certifications Those who use "that" to the full will win the exam! ?
yuj1osm
2
110
C++26 エラー性動作
faithandbrave
2
740
podman_update_2024-12
orimanabu
1
270
ブラックフライデーで購入したPixel9で、Gemini Nanoを動かしてみた
marchin1989
1
540
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
270
LINEヤフーのフロントエンド組織・体制の紹介【24年12月】
lycorp_recruit_jp
0
530
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
200
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Speed Design
sergeychernyshev
25
670
Building Applications with DynamoDB
mza
91
6.1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Embracing the Ebb and Flow
colly
84
4.5k
Site-Speed That Sticks
csswizardry
2
190
Six Lessons from altMBA
skipperchong
27
3.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Code Reviewing Like a Champion
maltzj
520
39k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
Transcript
PANDAS LOVES PONIES Lex Hider @LexualChocolate github.com/lexual
DJANGO PONY
PANDAS
PANDAS • Like R, but better • DataFrame • In
Memory SQL • Awesome Builds On Numpy/ Scipy Stack
PANDAS LOVES PONIES
None
import pandas as pd Like: • R frame • In
memory SQL • Excel spreadsheet Does: • SQL like JOINs in memory • groupby • pivot tables • plotting • reads csvs, excel, SQL
FROM CSV df = pd.read_csv('foo.csv')
None
FROM SQL
WHAT ABOUT DJANGO ???
FROM DJANGO
TO HTML df.to_html() HTML table outputted. {{ df.to_html }}
TO CSV df.to_csv('/tmp/foobar.csv')
TO DJANGO github.com/lexual/pandas-love-ponies • 1st Released 2013-02-14 • Valentine's Day
;)
github.com/lexual/pandas-love-ponies import pandas_love_ponies as plp # monkey patch. pd.DataFrame.to_django =
plp.to_django df = pd.DataFrame(some_data) df.to_django(MyDjModel) # OR plp.to_django(df, MyDjModel)
github.com/lexual/pandas-love-ponies from myapp.models import Sale df = pd.read_csv('sales.csv') df.to_django(Sale) #
OR plp.to_django(df, Sale)
FROM GOOGLE ANALYTICS (GA)
2 LINES FROM WEB SERVICE TO DB
FROM ADOBE MARKETING CLOUD • Adobe's "GA" product. • aka
SiteCatalyst or Omniture • github.com/lexual/sitecat-py Similar to read_ga() read_sc()
None
SECURITY IS OVERRATED ;) COME SEE MY SALT TALK TOMORROW
MORNING (There will be jokes)
linkd.in/12Kgg5K WE'RE HIRING! • Django/Python Developer • Melbourne Work with
some cool tech: • Salt • Riak (no-SQL db) • Pandas/Numpy/Scipy • git • AWS
THE END