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
270
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
260
Other Decks in Technology
See All in Technology
関係性が駆動するアジャイル──GPTに人格を与えたら、対話を通してふりかえりを習慣化できた話
mhlyc
0
130
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
11
77k
PLaMoの事後学習を支える技術 / PFN LLMセミナー
pfn
PRO
9
3.8k
Access-what? why and how, A11Y for All - Nordic.js 2025
gdomiciano
1
110
それでも私はContextに値を詰めたい | Go Conference 2025 / go conference 2025 fill context
budougumi0617
4
1.2k
Findy Team+のSOC2取得までの道のり
rvirus0817
0
310
Goに育てられ開発者向けセキュリティ事業を立ち上げた僕が今向き合う、AI × セキュリティの最前線 / Go Conference 2025
flatt_security
0
340
Railsアプリケーション開発者のためのブックガイド
takahashim
14
6.1k
リーダーになったら未来を語れるようになろう/Speak the Future
sanogemaru
0
270
生成AIとM5Stack / M5 Japan Tour 2025 Autumn 東京
you
PRO
0
170
いまさら聞けない ABテスト入門
skmr2348
1
190
FastAPIの魔法をgRPC/Connect RPCへ
monotaro
PRO
1
710
Featured
See All Featured
Building Applications with DynamoDB
mza
96
6.6k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
114
20k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
A Tale of Four Properties
chriscoyier
160
23k
Automating Front-end Workflow
addyosmani
1371
200k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
9
570
Designing for humans not robots
tammielis
254
25k
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