2015-05-29から1日間の記事一覧

<Python, matplotlib, mpld3> mpld3の出力結果(hoge.html)

<Python, matplotlib, mpld3> matplotlib を d3.js へ いいねー。

matplotlibのfigureをd3.jsへ変換してくれるすげーパッケージ。 MPLD3 — Bringing Matplotlib to the Browser 作った人は、Jake VanderPlasさん。 Jake VanderPlaswww.astro.washington.edu いやー。 すごいねー。 ということで、サンプルコード。 import ma…

<Python, pandas, items> DataFrameの要素を1つづつ取り出す。

データフレームDataFrameの要素を1つづつ取り出す方法。 df.itemsか、df.iteritems (どっちも同じっぽい) まずはデータフレーム作成。 In [44]: import pandas as pd In [45]: import numpy as np in [52]: df = pd.DataFrame(np.random.randn(5,3)) In [5…