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
230
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
240
Other Decks in Technology
See All in Technology
[PlatformCon 24] Platform Orchestrators: The Missing Middle of Internal Developer Platforms?
danielbryantuk
1
830
サーバー間 GraphQL と webmock-graphql の話 / server-to-server graphql and webmock-graphql
qsona
2
170
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
2k
ChatGPT for IT Service Management (IT Pro)
dahatake
7
1.5k
Next'24 事例セッションの紹介とクラウド資格を活用したキャリア形成について語りMuscle
yasumuusan
1
430
自己改善からチームを動かす! 「セルフエンジニアリングマネージャー」のすゝめ
shoota
5
150
少数チームで挑む: SwiftUI, TCA, KMPを用いた 新規動画配信アプリ 「ABEMA Live」の開発について
tomu28
0
620
開発生産性大幅アップ!Postman VS Code拡張機能
nagix
2
360
JSON攻略法.pdf
miyakemito
8
4.7k
FrontDoorとWebAppsを組み合わせた際のリダイレクト処理の注意点
kenichirokimura
1
480
継続的な改善 x ⾮連続的な進化
sansantech
PRO
3
130
DevOpsDays History and my DevOps story
kawaguti
PRO
9
2.4k
Featured
See All Featured
A Tale of Four Properties
chriscoyier
151
22k
Build your cross-platform service in a week with App Engine
jlugia
225
17k
The Invisible Customer
myddelton
114
12k
Documentation Writing (for coders)
carmenintech
60
3.9k
Testing 201, or: Great Expectations
jmmastey
28
6.3k
GraphQLの誤解/rethinking-graphql
sonatard
50
9.2k
Making the Leap to Tech Lead
cromwellryan
124
8.5k
Agile that works and the tools we love
rasmusluckow
325
20k
The Mythical Team-Month
searls
216
42k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
Mobile First: as difficult as doing things right
swwweet
216
8.6k
What's new in Ruby 2.0
geeforr
337
31k
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