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
mruby(PicoRuby)で ファミコン音楽を奏でる
kishima
1
280
Claude Code x Androidアプリ 開発
kgmyshin
1
590
コスト削減の基本の「キ」~ コスト消費3大リソースへの対策 ~
smt7174
2
170
7月のガバクラ利用料が高かったので調べてみた
techniczna
3
510
Figma + Storybook + PlaywrightのMCPを使ったフロントエンド開発
yug1224
9
2.8k
見てわかるテスト駆動開発
recruitengineers
PRO
5
420
AIエージェントの開発に必須な「コンテキスト・エンジニアリング」とは何か──プロンプト・エンジニアリングとの違いを手がかりに考える
masayamoriofficial
0
410
Yahoo!ニュースにおけるソフトウェア開発
lycorptech_jp
PRO
0
370
kintone開発チームの紹介
cybozuinsideout
PRO
0
73k
浸透しなさいRFC 5322&7208
hinono
0
120
Effective Match Types - Scala Days 2025
bishabosha
1
110
LLMエージェント時代に適応した開発フロー
hiragram
1
420
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
KATA
mclloyd
32
14k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Making Projects Easy
brettharned
117
6.3k
Rails Girls Zürich Keynote
gr2m
95
14k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
The World Runs on Bad Software
bkeepers
PRO
70
11k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
6k
Building Applications with DynamoDB
mza
96
6.6k
Into the Great Unknown - MozCon
thekraken
40
2k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
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