{"id":686,"date":"2026-08-30T06:18:25","date_gmt":"2026-08-29T21:18:25","guid":{"rendered":"https:\/\/www.marchboy.xyz\/wordpress\/archives\/686"},"modified":"2026-08-30T06:18:25","modified_gmt":"2026-08-29T21:18:25","slug":"pandas%e3%81%a8%e3%81%af%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.marchboy.xyz\/wordpress\/archives\/686","title":{"rendered":"pandas\u3068\u306f\uff1f"},"content":{"rendered":"<h2>pandas\u3068\u306f<\/h2>\n<p>pandas\uff08\u30d1\u30f3\u30c0\u30b9\uff09\u306f\u3001Python\u3067\u30c7\u30fc\u30bf\u64cd\u4f5c\u30fb\u5206\u6790\u3092\u884c\u3046\u305f\u3081\u306e\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\uff08\u8868\u5f62\u5f0f\u30c7\u30fc\u30bf\uff09\u3092\u4e2d\u5fc3\u306b\u3001\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u8fbc\u307f\u30fb\u52a0\u5de5\u30fb\u96c6\u8a08\u30fb\u53ef\u8996\u5316\u307e\u3067\u3092\u52b9\u7387\u7684\u306b\u884c\u3046\u6a5f\u80fd\u304c\u63c3\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u4e3b\u306a\u7279\u5fb4<\/h2>\n<ul>\n<li>\u9ad8\u901f\u306a\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u64cd\u4f5c<\/li>\n<li>CSV\u30fbExcel\u30fbSQL\u30fbJSON \u306a\u3069\u591a\u69d8\u306a\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u5165\u51fa\u529b<\/li>\n<li>\u6b20\u640d\u5024\u3084\u91cd\u8907\u30c7\u30fc\u30bf\u306e\u7c21\u5358\u306a\u51e6\u7406<\/li>\n<li>\u65e5\u6642\u30c7\u30fc\u30bf\u306e\u6271\u3044\u304c\u5f97\u610f<\/li>\n<li>NumPy \u3068\u9023\u643a\u3057\u305f\u9ad8\u901f\u8a08\u7b97<\/li>\n<\/ul>\n<h2>\u57fa\u672c\u7684\u306a\u30c7\u30fc\u30bf\u69cb\u9020<\/h2>\n<h3>Series\uff08\u30b7\u30ea\u30fc\u30ba\uff09<\/h3>\n<p>\u4e00\u6b21\u5143\u306e\u30e9\u30d9\u30eb\u4ed8\u304d\u914d\u5217\u3067\u3059\u3002\u30ea\u30b9\u30c8\u3084NumPy\u914d\u5217\u304b\u3089\u7c21\u5358\u306b\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>DataFrame\uff08\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\uff09<\/h3>\n<p>\u4e8c\u6b21\u5143\u306e\u30e9\u30d9\u30eb\u4ed8\u304d\u30c6\u30fc\u30d6\u30eb\u3067\u3059\u3002\u884c\u3068\u5217\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u6301\u3061\u3001SQL \u306e\u30c6\u30fc\u30d6\u30eb\u3084 Excel \u306e\u30b7\u30fc\u30c8\u306b\u4f3c\u305f\u64cd\u4f5c\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h2>\u7c21\u5358\u306a\u4f7f\u7528\u4f8b<\/h2>\n<p>\u4ee5\u4e0b\u306f CSV \u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u307f\u3001\u57fa\u672c\u7684\u306a\u96c6\u8a08\u3092\u884c\u3046\u4f8b\u3067\u3059\u3002<\/p>\n<pre><code>import pandas as pd\n\n# CSV \u306e\u8aad\u307f\u8fbc\u307f\n df = pd.read_csv('sales_data.csv')\n\n# \u5148\u982d5\u884c\u3092\u8868\u793a\n print(df.head())\n\n# \u58f2\u4e0a\u306e\u5408\u8a08\u3092\u5217\u3054\u3068\u306b\u8a08\u7b97\n total_sales = df['amount'].sum()\n print('\u7dcf\u58f2\u4e0a:', total_sales)\n\n# \u6708\u3054\u3068\u306e\u58f2\u4e0a\u3092\u96c6\u8a08\n monthly = df.groupby(df['date'].dt.to_period('M'))['amount'].sum()\n print(monthly)<\/code><\/pre>\n<h2>\u5c0e\u5165\u65b9\u6cd5<\/h2>\n<p>pandas \u306f pip \u307e\u305f\u306f conda \u3067\u7c21\u5358\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code># pip \u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\n pip install pandas\n\n# conda \u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\n conda install pandas<\/code><\/pre>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>pandas \u306f\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30b9\u3084\u6a5f\u68b0\u5b66\u7fd2\u306e\u524d\u51e6\u7406\u3067\u4e0d\u53ef\u6b20\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002<strong>\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u304b\u3089\u52a0\u5de5\u3001\u96c6\u8a08\u307e\u3067\u3092\u4e00\u8cab\u3057\u3066\u884c\u3048\u308b<\/strong>\u70b9\u304c\u5927\u304d\u306a\u9b45\u529b\u3067\u3042\u308a\u3001Python \u3092\u4f7f\u3046\u591a\u304f\u306e\u30a8\u30f3\u30b8\u30cb\u30a2\u30fb\u7814\u7a76\u8005\u306b\u5e83\u304f\u5229\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>pandas\u3068\u306f pandas\uff08\u30d1\u30f3\u30c0\u30b9\uff09\u306f\u3001Python\u3067\u30c7\u30fc\u30bf\u64cd\u4f5c\u30fb\u5206\u6790\u3092\u884c\u3046\u305f\u3081\u306e\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\uff08\u8868\u5f62\u5f0f\u30c7\u30fc\u30bf\uff09\u3092\u4e2d\u5fc3\u306b\u3001\u30c7\u30fc\u30bf\u306e\u8aad\u307f\u8fbc\u307f\u30fb\u52a0\u5de5\u30fb\u96c6\u8a08\u30fb\u53ef\u8996\u5316\u307e\u3067\u3092\u52b9\u7387\u7684\u306b\u884c\u3046\u6a5f\u80fd\u304c\u63c3 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[],"class_list":["post-686","post","type-post","status-publish","format-standard","hentry","category-python"],"_links":{"self":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts\/686","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/comments?post=686"}],"version-history":[{"count":0,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/posts\/686\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/media?parent=686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/categories?post=686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.marchboy.xyz\/wordpress\/wp-json\/wp\/v2\/tags?post=686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}