{"image_url":null,"type":"rich","published":"2017-11-12 00:00:00","url":"https://anton0825.hatenablog.com/entry/2017/11/12/000000","height":"190","blog_title":"\u65e5\u3005\u7cbe\u9032","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fanton0825.hatenablog.com%2Fentry%2F2017%2F11%2F12%2F000000\" title=\"DataFrame\u306e\u51e6\u7406\u3092\u4e26\u5217\u5316\u3059\u308b\u3068\u975e\u5e38\u306b\u9045\u304f\u306a\u308b\u3053\u3068\u304c\u3042\u308b - \u65e5\u3005\u7cbe\u9032\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","categories":["AI"],"title":"DataFrame\u306e\u51e6\u7406\u3092\u4e26\u5217\u5316\u3059\u308b\u3068\u975e\u5e38\u306b\u9045\u304f\u306a\u308b\u3053\u3068\u304c\u3042\u308b","description":"\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30b0\u30eb\u30fc\u30d7\u6bce\u306b\u96c6\u8a08\u3059\u308b\u51e6\u7406\u306e\u5834\u5408 sums: DataFrame = train.groupby(ids)[SALES_COUNT].sum() \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3068\u30b0\u30eb\u30fc\u30d7\u5358\u4f4d\u3067\u4e26\u5217\u5316\u3067\u304d\u308b\u306e\u3067\u901f\u304f\u306a\u308a\u305d\u3046\u306b\u601d\u3048\u308b\u3002 def func(df): return df[SALES_COUNT].sum() ret_list: List = Parallel(n_jobs=cpu_count, backend=\"threading\")(delayed(func)(group) for name, group in df.groupby(group_id)) \u304c\u3001\u5b9f\u969b\u8a08\u6e2c\u3057\u3066\u307f\u308b\u3068\u4e26\u2026","provider_name":"Hatena Blog","version":"1.0","author_name":"anton0825","author_url":"https://blog.hatena.ne.jp/anton0825/","provider_url":"https://hatena.blog","width":"100%","blog_url":"https://anton0825.hatenablog.com/"}