R -> Python

  • Published on
    23-Aug-2014

  • View
    1.033

  • Download
    14

Embed Size (px)

DESCRIPTION

Pandas, ggplot, scikit-learn, RDKit

Transcript

<ul><li> R -&gt; Python Mishima.syk #3 </li> <li> kzfm (@fmkz___) blog.kzfmix.com Shizuoka.py drumnbass Python6 Perl Flask, Pandas </li> <li> R </li> <li> Rstudio 1990-2010 UFO </li> <li> ggplot2 g + geom_point() + facet_wrap(~Species) + geom_smooth(method='lm') </li> <li> R </li> <li> Python </li> <li> R Python Pandas (DataFrame) ggplot (ggplotPython) scikit-learn (python) </li> <li> Pandas http://pandas.pydata.org/ </li> <li> Pandas R http://www.slideshare.net/KazufumiOhkawa/1 2-20049278 </li> <li> Series() &gt;&gt;&gt; a = pd.Series(range(5), index=list(abcde)) # 0..5a..e &gt;&gt;&gt; a[list(ace)] #index a 0 c 2 e 4 dtype: int64 &gt;&gt;&gt; a[[0,2,4]] # 0,2,4 a 0 c 2 e 4 dtype: int64 &gt;&gt;&gt; a[(a3)] #13 a 0 e 4 dtype: int64 </li> <li> DataFrame &gt;&gt;&gt; pd.DataFrame([[1,2,3],[4,5,6]]) 0 1 2 0 1 2 3 1 4 5 6 </li> <li> DataFrame &gt;&gt;&gt; x.index = list("ab") &gt;&gt;&gt; x.columns = list("cde") &gt;&gt;&gt; x c d e a 1 2 3 b 4 5 6 </li> <li> DataFrame &gt;&gt;&gt; x["c"] a 1 b 4 Name: c, dtype: int64 &gt;&gt;&gt; x.c a 1 b 4 Name: c, dtype: int64 </li> <li> &gt;&gt;&gt; x.c.mean() # (1+4) / 2 2.5 &gt;&gt;&gt; x.c.sum() # 1+4 5 </li> <li> &gt;&gt;&gt; x 0 1 0 1 0 1 -2 3 &gt;&gt;&gt; pd.concat([x, x], axis=0) # rbind 0 1 0 1 0 1 -2 3 0 1 0 1 -2 3 &gt;&gt;&gt; pd.concat([x, x], axis=1) # cbind 0 1 0 1 0 1 0 1 0 1 -2 3 -2 3 </li> <li> Pandas R http://blog.kzfmix.com/entry/1387969720 http://blog.kzfmix.com/entry/1388051876 http://blog.kzfmix.com/entry/1388138505 </li> <li> ggplot ggplotpython </li> <li> ()ggplot2 Photoshop ggplot2R </li> <li> ()IRIS </li> <li> g</li></ul>

Recommended

View more >