Unified governance for all data, analytics and AI assets
Sorry, but the page you were trying to view does not exist — perhaps you can try searching for it below.
今日はPython (Pandas)で高速にCSVを読むことに挑戦したいと思います。 Kaggleに参加するたびに、イライラしていたので各実装の白黒はっきりさせようと思います。 R使いが羨ましいなぁと思う第一位がCSV読込が簡単に並列出来て速いことなので、 なんとかGILのあるPythonでも高速に読み込みたいと思います。 ただ、この検証ではコーディング量が多いものは検証しません。 CSV読込は頻出するので、フットワークの軽さが重要です。(オレオレライブラリ嫌い) Pickleは早いけど。。。 結論はDask使おう! 検証環境 データ 速度検証 pandas.read_csv() pandas.read_csv() (dtype指定) pandas.read_csv() (gzip圧縮) numpy.genfromtxt() pandas.read_csv() (chunksize指定 +
※ 上記はこの記事を書いている2010年10月時点の内容です。 このうち、実際に使おうと試してみたのは「opencsv」と「Super Csv」、「OrangeSignal CSV」の三つ。 他は、情報収集の時点でいまいちピンと来なかったり、環境面で使えなかったりしたので、除外した。 他にもまだまだありそうだが、調べてて名前を見かけるのはこれぐらいかと思われる。 (その他、Commons LangのStringEscapeUtilsにもCSV関係のメソッドがあるが、エスケープ/アンエスケープしか出来ないので問題外。) で、使ってみた感覚としては・・・結論として「Super Csv」が一番使い勝手がよさそうだった。 いろいろと高機能ではあるらしいものの、単純にCSV→Mapのように読み込むだけであれば簡単なコードでさくっと書くことができる。 こういう使い方ができれば、多くの場合目的をカバーで
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く