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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
lexual
July 05, 2013
Technology
300
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Pandas Loves Ponies
Pandas do love ponies.
Talk about getting Django & Pandas code working together.
lexual
July 05, 2013
More Decks by lexual
See All by lexual
Salt: How To Be Truly Lazy
lexual
1
280
Other Decks in Technology
See All in Technology
入門!AWS Blocks
ysuzuki
1
180
起点・思考・出力で分解する 〜PM業務の自動化設計〜
kazu_kichi_67
1
910
現場のトークンマネジメント
dak2
1
170
作る力から、見極める力へ — AI時代に広がるエンジニアの価値と役割
rince
0
310
PostgreSQL 19 新機能概要 OSC Hokkaido 2026
nori_shinoda
0
230
ACE-Step-1.5で見る 音楽生成AIのしくみと“破綻だけ直す”Retake機能の開発【zennfes spring 2026 登壇資料】
personabb
1
560
クレデンシャル流出 ― 攻撃 3 時間 vs 復旧 10 時間。この非対称性にどう備えるか
kazzpapa3
3
530
攻撃者視点で考えるDetection Engineering
cryptopeg
3
2.1k
FPGAの開発コンペでZephyrを使ってみた
iotengineer22
0
190
GitHub Copilot app最速の発信の裏側
tomokusaba
1
240
クラウドファンディング版StackChan 3体(4体)をインタラクティブな体験型作品にして展示もした話 / スタックチャンお誕生日会2026
you
PRO
0
170
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
3k
Featured
See All Featured
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
The SEO identity crisis: Don't let AI make you average
varn
0
500
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The Language of Interfaces
destraynor
162
27k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
870
HDC tutorial
michielstock
2
720
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Navigating Team Friction
lara
192
16k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.5k
Crafting Experiences
bethany
1
190
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
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