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
290
0
Share
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
AI時代 に増える データ活用先
takahal
0
320
EMから幅を広げるために最近挑戦していること / Recent challenges I'm undertaking to expand my horizons beyond EM
hiro_torii
1
120
コードや知識を組み込む / Incorporate Code and Knowledge
ks91
PRO
0
170
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
79k
目的ファーストのハーネス設計 ~ハーネスの変更容易性を高めるための優先順位~
gotalab555
8
2.4k
AI駆動1on1〜AIに自分を育ててもらう〜
yoshiakiyasuda
0
150
レビューしきれない?それは「全て人力でのレビュー」だからではないでしょうか
amixedcolor
0
350
プラットフォームエンジニアリングの実践 - AWS コンテナサービスで構築する社内プラットフォーム / AWS Containers Platform Meetup #1
literalice
1
210
AIを共同作業者にして書籍を執筆する方法 / How to Write a Book with AI as a Co-Creator
ama_ch
2
150
社内エンジニア勉強会の醍醐味と苦しみ/tamadev
nishiuma
0
240
Cortex Codeのコスト見積ヒントご紹介
yokatsuki
0
110
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.4k
Featured
See All Featured
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
680
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
270
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
490
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
Documentation Writing (for coders)
carmenintech
77
5.3k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
220
From π to Pie charts
rasagy
0
170
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
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