{"id":3125,"date":"2023-01-23T12:15:40","date_gmt":"2023-01-23T03:15:40","guid":{"rendered":"https:\/\/blog.since2020.jp\/?p=3125"},"modified":"2023-01-23T13:24:35","modified_gmt":"2023-01-23T04:24:35","slug":"dataframe-totalling","status":"publish","type":"post","link":"https:\/\/since2020.jp\/media\/dataframe-totalling\/","title":{"rendered":"DataFrame\u306e\u9031\u5358\u4f4d\u3084\u6708\u5358\u4f4d\u306e\u30c7\u30fc\u30bf\u96c6\u8a08"},"content":{"rendered":"\n<p>DataFrame\u306e\u9031\u5358\u4f4d\u3084\u6708\u5358\u4f4d\u306e\u30c7\u30fc\u30bf\u96c6\u8a08<\/p>\n\n\n<h2>\u7279\u5fb4\u91cf\u30a8\u30f3\u30b8\u30cb\u30a2\u30ea\u30f3\u30b0\u300c.resample()\u300d\u30e1\u30bd\u30c3\u30c9<\/h2>\n<p>AI\u3084\u6a5f\u68b0\u5b66\u7fd2\u306e\u30e2\u30c7\u30eb\u3092\u5b9f\u88c5\u3059\u308b\u969b\u306b\u5fc5\u8981\u4e0d\u53ef\u6b20\u306a\u4f5c\u696d\u306b\u7279\u5fb4\u91cf\u30a8\u30f3\u30b8\u30cb\u30a2\u30ea\u30f3\u30b0\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306fAI\u30e2\u30c7\u30eb\u306e\u4e88\u6e2c\u7cbe\u5ea6\u3092\u5411\u4e0a\u3055\u305b\u308b\u305f\u3081\u306b\u3001\u4e88\u6e2c\u306b\u5fc5\u8981\u306a\u7279\u5fb4\u91cf\u3092\u30c7\u30fc\u30bf\u304b\u3089\u4f5c\u6210\u3059\u308b\u4f5c\u696d\u3067\u3059\u3002\u3053\u306e\u7279\u5fb4\u91cf\u30a8\u30f3\u30b8\u30cb\u30a2\u30ea\u30f3\u30b0\u3092\u3059\u308b\u969b\u3001\u7279\u5fb4\u91cf\u3068\u3057\u3066\u7279\u5b9a\u671f\u9593\u306e\u5e73\u5747\u5024\u3084\u6a19\u6e96\u504f\u5dee\u306a\u3069\u306e\u57fa\u790e\u7684\u306a\u7d71\u8a08\u91cf\u304c\u3088\u304f\u4f7f\u308f\u308c\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u7279\u5fb4\u91cf\u30a8\u30f3\u30b8\u30cb\u30a2\u30ea\u30f3\u30b0\u3067\u3001df\u304b\u3089\u9031\u5358\u4f4d\u3084\u6708\u5358\u4f4d\u306e\u7d71\u8a08\u91cf\u3092\u7b97\u51fa\u3059\u308b\u6642\u306b\u5f79\u306b\u305f\u3064.resample()\u30e1\u30bd\u30c3\u30c9\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n<h2>.resample()\u30e1\u30bd\u30c3\u30c9\u306e\u4f7f\u3044\u65b9\uff3f\u57fa\u672c\u5f62<\/h2>\n<p>DataFrame\u3092\u9031\u5358\u4f4d\u3084\u6708\u5358\u4f4d\u3067\u96c6\u8a08\u3059\u308b\u306b\u306f\u3001.resample()\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u57fa\u672c\u5f62\u306f\u4e0b\u8a18\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>df.resample(\u2019\u96c6\u8a08\u671f\u9593\u2019).\u96c6\u8a08\u30e1\u30bd\u30c3\u30c9<\/strong><\/p>\n<p>\u96c6\u8a08\u671f\u9593\u306f\u6708\u5358\u4f4d\u3084\u9031\u5358\u4f4d\u3060\u3051\u3067\u306f\u306a\u304f\u56db\u534a\u671f\u3054\u3068\u3084n\u65e5\u3054\u3068\u306a\u3069\u306e\u96c6\u8a08\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n<h2>\u5177\u4f53\u7684\u306a\u5b9f\u88c5\u65b9\u6cd5\u306b\u3064\u3044\u3066<\/h2>\n<p><img decoding=\"async\" width=\"960\" height=\"540\" src=\"\/wp-content\/uploads\/2023\/01\/DataFrame.png\" alt=\"\" class=\"wp-image-3126\" srcset=\"https:\/\/since2020.jp\/media\/wp-content\/uploads\/2023\/01\/DataFrame.png 960w, https:\/\/since2020.jp\/media\/wp-content\/uploads\/2023\/01\/DataFrame-300x169.png 300w, https:\/\/since2020.jp\/media\/wp-content\/uploads\/2023\/01\/DataFrame-768x432.png 768w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>\u5177\u4f53\u7684\u306a\u96c6\u8a08\u65b9\u6cd5\u3092\u89e3\u8aac\u3059\u308b\u305f\u3081\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30c7\u30fc\u30bf\u306e\u9031\u5358\u4f4d\u3068\u6708\u5358\u4f4d\u306e\u7d71\u8a08\u91cf\uff08\u5e73\u5747\u5024\u3001\u6a19\u6e96\u504f\u5dee\u3001\u6700\u5927\u5024\u3001\u6700\u5c0f\u5024\uff09\u3092\u7b97\u51fa\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n<h2>\u65e5\u6642\u30c7\u30fc\u30bf\u3092\u6708\u6b21\u30c7\u30fc\u30bf\u3078<\/h2>\n<p><img decoding=\"async\" width=\"1364\" height=\"898\" src=\"\/wp-content\/uploads\/2023\/01\/DataFrame2.jpg\" alt=\"\" class=\"wp-image-3127\" srcset=\"https:\/\/since2020.jp\/media\/wp-content\/uploads\/2023\/01\/DataFrame2.jpg 1364w, https:\/\/since2020.jp\/media\/wp-content\/uploads\/2023\/01\/DataFrame2-300x198.jpg 300w, https:\/\/since2020.jp\/media\/wp-content\/uploads\/2023\/01\/DataFrame2-1024x674.jpg 1024w, https:\/\/since2020.jp\/media\/wp-content\/uploads\/2023\/01\/DataFrame2-768x506.jpg 768w\" sizes=\"(max-width: 1364px) 100vw, 1364px\" \/><\/p>\n<p>\u3042\u308bDataFrame\u306e\u6708\u5358\u4f4d\u306e\u7d71\u8a08\u91cf\u306f\u6b21\u306e\u3088\u3046\u306b\u96c6\u8a08\u3057\u307e\u3059\u3002<\/p>\n<p><strong>df.resample(&#8220;M&#8221;).mean() #\u6708\u5358\u4f4d\u306e\u5e73\u5747\u5024<\/strong><br \/><strong>df.resample(&#8220;M&#8221;).std()\u3000#\u6708\u5358\u4f4d\u306e\u6a19\u6e96\u504f\u5dee<\/strong><br \/><strong>df.resample(&#8220;M&#8221;).max()\u3000#\u6708\u5358\u4f4d\u306e\u6700\u5927\u5024<\/strong><br \/><strong>df.resample(&#8220;M&#8221;).min()\u3000#\u6708\u5358\u4f4d\u306e\u6700\u5c0f\u5024<\/strong><\/p>\n<p>\u3053\u308c\u3089\u306e\u5b9f\u884c\u7d50\u679c\u304c\u4e0b\u8a18\u306b\u306a\u308a\u307e\u3059\u3002\u65e5\u6642\u30c7\u30fc\u30bf\u304b\u3089\u6708\u6b21\u30c7\u30fc\u30bf\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n\n<h2>\u65e5\u6642\u30c7\u30fc\u30bf\u3092\u9031\u6b21\u30c7\u30fc\u30bf\u3078<\/h2>\n<p><img decoding=\"async\" width=\"1360\" height=\"678\" src=\"\/wp-content\/uploads\/2023\/01\/DataFrame3.png\" alt=\"\" class=\"wp-image-3128\" srcset=\"https:\/\/since2020.jp\/media\/wp-content\/uploads\/2023\/01\/DataFrame3.png 1360w, https:\/\/since2020.jp\/media\/wp-content\/uploads\/2023\/01\/DataFrame3-300x150.png 300w, https:\/\/since2020.jp\/media\/wp-content\/uploads\/2023\/01\/DataFrame3-1024x510.png 1024w, https:\/\/since2020.jp\/media\/wp-content\/uploads\/2023\/01\/DataFrame3-768x383.png 768w\" sizes=\"(max-width: 1360px) 100vw, 1360px\" \/><\/p>\n<p>\u3042\u308bDataFrame\u306e\u9031\u5358\u4f4d\u306e\u7d71\u8a08\u91cf\u306f\u6b21\u306e\u3088\u3046\u306b\u96c6\u8a08\u3057\u307e\u3059\u3002<\/p>\n<p><strong>df.resample(&#8220;W&#8221;).mean() #\u9031\u5358\u4f4d\u306e\u5e73\u5747\u5024<\/strong><br \/><strong>df.resample(&#8220;W&#8221;).std()\u3000#\u9031\u5358\u4f4d\u306e\u6a19\u6e96\u504f\u5dee<\/strong><br \/><strong>df.resample(&#8220;W&#8221;).max()\u3000#\u9031\u5358\u4f4d\u306e\u6700\u5927\u5024<\/strong><br \/><strong>df.resample(&#8220;W&#8221;).min()\u3000#\u9031\u5358\u4f4d\u306e\u6700\u5c0f\u5024<\/strong><\/p>\n<p>\u3053\u308c\u3089\u306e\u5b9f\u884c\u7d50\u679c\u304c\u4e0b\u8a18\u306b\u306a\u308a\u307e\u3059\u3002\u65e5\u6642\u30c7\u30fc\u30bf\u304b\u3089\u9031\u6b21\u30c7\u30fc\u30bf\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n\n<h2>\u7279\u5fb4\u91cf\u30a8\u30f3\u30b8\u30cb\u30a2\u30ea\u30f3\u30b0\u3092\u52b9\u7387\u7684\u306b\u5b9f\u88c5\u3059\u308b\u300c.resample()\u300d\u30e1\u30bd\u30c3\u30c9<\/h2>\n<p>\u4eca\u56de\u3001df\u304b\u3089\u9031\u5358\u4f4d\u3084\u6708\u5358\u4f4d\u306e\u7d71\u8a08\u91cf\u3092\u7b97\u51fa\u3067\u304d\u308b.resample()\u30e1\u30bd\u30c3\u30c9\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002\u5404\u5358\u4f4d\u306e\u7d71\u8a08\u91cf\u304c\u4e00\u884c\u3067\u7b97\u51fa\u3067\u304d\u308b\u306e\u3067\u7279\u5fb4\u91cf\u30a8\u30f3\u30b8\u30cb\u30a2\u30ea\u30f3\u30b0\u304c\u52b9\u7387\u826f\u304f\u5b9f\u88c5\u3067\u304d\u3001\u30b3\u30fc\u30c9\u306e\u53ef\u8996\u6027\u3082\u5411\u4e0a\u3059\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u305c\u3072\u4f7f\u3063\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>DataFrame\u306e\u9031\u5358\u4f4d\u3084\u6708\u5358\u4f4d\u306e\u30c7\u30fc\u30bf\u96c6\u8a08 \u7279\u5fb4\u91cf\u30a8\u30f3\u30b8\u30cb\u30a2\u30ea\u30f3\u30b0\u300c.resample()\u300d\u30e1\u30bd\u30c3\u30c9 AI\u3084\u6a5f\u68b0\u5b66\u7fd2\u306e\u30e2\u30c7\u30eb\u3092\u5b9f\u88c5\u3059\u308b\u969b\u306b\u5fc5\u8981\u4e0d\u53ef\u6b20\u306a\u4f5c\u696d\u306b\u7279\u5fb4\u91cf\u30a8\u30f3\u30b8\u30cb\u30a2\u30ea\u30f3\u30b0\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306fAI\u30e2\u30c7\u30eb\u306e\u4e88\u6e2c\u7cbe\u5ea6 [&hellip;]<\/p>\n","protected":false},"author":85,"featured_media":2525,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","swell_btn_cv_data":"","footnotes":"","_wp_rev_ctl_limit":""},"categories":[1249],"tags":[357,356,96,351,352,353,354,355],"class_list":{"0":"post-3125","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-knowledge","8":"tag-resample","10":"tag-ai","11":"tag-dataframe","12":"tag-df","13":"tag-353","14":"tag-354","15":"tag-355"},"_links":{"self":[{"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/posts\/3125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/users\/85"}],"replies":[{"embeddable":true,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/comments?post=3125"}],"version-history":[{"count":1,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/posts\/3125\/revisions"}],"predecessor-version":[{"id":3129,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/posts\/3125\/revisions\/3129"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/media\/2525"}],"wp:attachment":[{"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/media?parent=3125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/categories?post=3125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/since2020.jp\/media\/wp-json\/wp\/v2\/tags?post=3125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}