pandas はデータ解析やデータ加工に非常に便利なPythonライブラリですが、並列化されている処理とされていない処理があり、注意が必要です。例えば pd.Sereis.__add__ のようなAPI(つまり df['a'] + df['b'] のような処理です)は処理が numpy に移譲されているためPythonのGILの影響を受けずに並列化されますが、 padas.DataFrame.apply などのメソッドはPythonのみで実装されているので並列化されません。 処理によってはそこがボトルネックになるケースもあります。今回は「ほぼimportするだけ」で pandas の並列化されていない処理を並列化し高速化できる2つのライブラリを紹介します。同時に2つのライブラリのベンチマークをしてみて性能を確かめました。 pandarallel pandaralell はPythonの m
If you find this information useful, consider picking up a copy of my book, The Python Standard Library By Example. Page Contents Communication Between Processes Passing Messages to Processes Signaling between Processes Controlling Access to Resources Synchronizing Operations Controlling Concurrent Access to Resources Managing Shared State Shared Namespaces Process Pools Navigation Table of Conten
I am sorry that I can't reproduce the error with a simpler example, and my code is too complicated to post. If I run the program in IPython shell instead of the regular Python, things work out well. I looked up some previous notes on this problem. They were all caused by using pool to call function defined within a class function. But this is not the case for me. Exception in thread Thread-3: Trac
ロゴステッカーの作成計画も進行中です。近々イベント会場でお配りできるかも知れません。 チュートリアルおよび次回勉強会のお知らせ この度PyData.Tokyo初の試みとして、初心者向けのチュートリアルを3月7日(土曜日)に行います。また、次回勉強会はデータ解析に関する「高速化」をテーマにし、4月3日(金曜日)に開催します。詳細は記事の最後をご覧下さい。 Sparkによる分散処理入門 PyData.Tokyo オーガナイザーのシバタアキラ(@madyagi)です。 ビッグデータを処理するための基盤としてHadoopは既にデファクトスタンダードになりつつあります。一方で、データ処理に対するさらなる高速化と安定化に向けて、新しい技術が日々生まれており、様々な技術が競争し、淘汰されています。そんな中、Apache Spark(以下Spark)は、新しい分析基盤として昨年あたりから急激にユーザーを増
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く