{"id":70386,"date":"2026-02-01T22:33:15","date_gmt":"2026-02-01T14:33:15","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/70386.html"},"modified":"2026-02-01T22:33:15","modified_gmt":"2026-02-01T14:33:15","slug":"%e6%95%b0%e6%8d%ae%e6%95%b4%e5%ae%b9%e6%9c%af%ef%bc%9apandasmatplotlib%e8%ae%a9%e4%bd%a0%e7%9a%84%e6%95%b0%e6%8d%ae%e4%bc%9a%e8%af%b4%e8%af%9d","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/70386.html","title":{"rendered":"\u6570\u636e\u201c\u6574\u5bb9\u201d\u672f\uff1aPandas+Matplotlib\u8ba9\u4f60\u7684\u6570\u636e\u4f1a\u8bf4\u8bdd"},"content":{"rendered":"<p>\u6700\u8fd1\u5728\u5b66\u4e60 Python \u6570\u636e\u5206\u6790&#xff0c;\u6211\u7528 PyCharm \u5199\u4e86\u51e0\u6bb5\u4ee3\u7801&#xff0c;\u628a\u4ece\u6570\u636e\u6e05\u6d17\u5230\u53ef\u89c6\u5316\u7684\u5b8c\u6574\u6d41\u7a0b\u8dd1\u4e86\u4e00\u904d\u3002\u4eca\u5929\u5c31\u6765\u5206\u4eab\u4e00\u4e0b\u6211\u7684\u5b9e\u6218\u5fc3\u5f97&#xff0c;\u5e0c\u671b\u80fd\u5e2e\u5230\u521a\u5165\u95e8\u7684\u670b\u53cb\u3002<br \/>\n\u00a0<\/p>\n<p>&#x1f4ca; \u4e00\u3001Pandas&#xff1a;\u6570\u636e\u5904\u7406\u7684\u57fa\u77f3<\/p>\n<p>\u6570\u636e\u5206\u6790\u7684\u7b2c\u4e00\u6b65&#xff0c;\u6c38\u8fdc\u662f\u5904\u7406\u539f\u59cb\u6570\u636e\u3002Pandas \u4f5c\u4e3a Python \u6570\u636e\u5206\u6790\u7684\u6838\u5fc3\u5e93&#xff0c;\u8ba9\u8fd9\u4e2a\u8fc7\u7a0b\u53d8\u5f97\u975e\u5e38\u9ad8\u6548\u3002<\/p>\n<p>1. \u521b\u5efa\u4e0e\u67e5\u770b DataFrame\u6211\u4eec\u53ef\u4ee5\u7528\u5b57\u5178\u5feb\u901f\u6784\u9020\u4e00\u4e2a\u6570\u636e\u96c6&#xff0c;\u7136\u540e\u8f6c\u6362\u6210 DataFrame \u8868\u683c&#xff0c;\u8fd9\u6837\u5c31\u80fd\u76f4\u89c2\u5730\u770b\u5230\u6570\u636e\u7ed3\u6784\u3002<\/p>\n<p>import pandas as pd<\/p>\n<p>dic &#061; {&#039;name&#039;: [&#039;kiti&#039;, &#039;beta&#039;, &#039;peter&#039;, &#039;tom&#039;],<br \/>\n           &#039;age&#039;:[20,18, 35,21],<br \/>\n           &#039;gender&#039;: [&#039;f&#039;, &#039;f&#039;, &#039;m&#039;, &#039;m&#039;]}<br \/>\ndf &#061; pd.DataFrame(dic)<br \/>\nprint(df)<\/p>\n<p>df &#061; df.sort_values(by&#061;[&#039;age&#039;])<br \/>\ndf &#061; df.sort_values(by&#061;[&#039;age&#039;], ascending&#061;False)<br \/>\na&#061; df[&#039;gender&#039;]<br \/>\nb &#061; a.replace([&#039;m&#039;, &#039;f&#039;],[&#039;male&#039;, &#039;female&#039;])<br \/>\ndf[&#039;gender&#039;] &#061; b<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"701\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260201143312-697f64288ad61.png\" width=\"1134\" \/><br \/>\n\u00a0<\/p>\n<p>2. \u6570\u636e\u6392\u5e8f<\/p>\n<p>sort_values() \u662f\u6211\u6700\u5e38\u7528\u7684\u51fd\u6570\u4e4b\u4e00&#xff0c;\u5b83\u53ef\u4ee5\u8ba9\u6211\u5feb\u901f\u6309\u67d0\u4e00\u5217\u6392\u5e8f&#xff0c;\u627e\u5230\u6781\u503c\u3002<\/p>\n<p># \u6309\u5e74\u9f84\u5347\u5e8f<br \/>\ndf &#061; df.sort_values(by&#061;[&#039;age&#039;])<br \/>\n# \u6309\u5e74\u9f84\u964d\u5e8f<br \/>\ndf &#061; df.sort_values(by&#061;[&#039;age&#039;], ascending&#061;False)<\/p>\n<p>\u8fd9\u4e00\u6b65\u80fd\u5e2e\u6211\u5feb\u901f\u5b9a\u4f4d\u5230\u5e74\u9f84\u6700\u5927\u6216\u6700\u5c0f\u7684\u8bb0\u5f55&#xff0c;\u4e3a\u540e\u7eed\u5206\u6790\u63d0\u4f9b\u7ebf\u7d22\u3002<\/p>\n<p>3. \u6570\u636e\u6620\u5c04\u4e0e\u66ff\u6362<\/p>\n<p>\u539f\u59cb\u6570\u636e\u91cc\u7684\u7b80\u5199&#xff08;\u6bd4\u5982 &#039;m&#039; \u548c &#039;f&#039;&#xff09;\u53ef\u8bfb\u6027\u5f88\u5dee&#xff0c;\u7528 replace() \u53ef\u4ee5\u8f7b\u677e\u6620\u5c04\u6210\u66f4\u76f4\u89c2\u7684\u6587\u5b57\u3002<\/p>\n<p>a &#061; df[&#039;gender&#039;]<br \/>\nb &#061; a.replace([&#039;m&#039;, &#039;f&#039;], [&#039;male&#039;, &#039;female&#039;])<br \/>\ndf[&#039;gender&#039;] &#061; b<\/p>\n<p>\u5904\u7406\u540e&#xff0c;gender \u5217\u5c31\u4f1a\u663e\u793a male \u548c female&#xff0c;\u6574\u4e2a\u6570\u636e\u96c6\u7684\u53ef\u8bfb\u6027\u7acb\u523b\u63d0\u5347\u3002<\/p>\n<p>4. \u6587\u4ef6\u8bfb\u5199<\/p>\n<p>\u6570\u636e\u5206\u6790\u79bb\u4e0d\u5f00\u548c\u5916\u90e8\u6587\u4ef6\u6253\u4ea4\u9053&#xff0c;Pandas \u652f\u6301\u591a\u79cd\u683c\u5f0f\u7684\u8bfb\u5199&#xff0c;\u975e\u5e38\u65b9\u4fbf\u3002<\/p>\n<p>import pandas as pd<br \/>\ndf_1 &#061; pd.read_csv(&#034;..\/numpy\/data1.csv&#034;)<\/p>\n<p>df_2 &#061; pd.read_csv(&#034;..\/numpy\/data2.csv&#034;, encoding&#061;&#039;utf8&#039;, header&#061;None)<\/p>\n<p>df_3 &#061; pd.read_excel(&#034;data3.xlsx&#034;) #<\/p>\n<p>df_4 &#061; pd.read_table(&#034;data4.txt&#034;,sep&#061;&#039;,&#039;,header&#061;None)<\/p>\n<p>df_1.to_csv(&#034;\u5bfc\u51fa.csv&#034;,index&#061;True, header&#061;True)<\/p>\n<p>df_1.to_excel(&#034;\u5bfc\u51fa.xlsx&#034;,index&#061;True, header&#061;True)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"671\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260201143313-697f64290e543.png\" width=\"1199\" \/><br \/>\n&#x1f4cc; \u5c0f\u6280\u5de7&#xff1a;\u9047\u5230\u4e71\u7801\u95ee\u9898\u65f6&#xff0c;\u53ef\u4ee5\u8bd5\u8bd5 encoding&#061;&#039;utf8&#039; \u6216 &#039;gbk&#039;&#xff1b;\u5982\u679c\u6587\u4ef6\u6ca1\u6709\u8868\u5934&#xff0c;\u8bb0\u5f97\u8bbe\u7f6e header&#061;None\u3002<\/p>\n<p>5. \u7f3a\u5931\u503c\u5904\u7406<\/p>\n<p>\u771f\u5b9e\u6570\u636e\u603b\u4f1a\u6709\u7f3a\u5931\u503c&#xff0c;Pandas \u63d0\u4f9b\u4e86\u4e24\u79cd\u6838\u5fc3\u5904\u7406\u65b9\u5f0f&#xff1a;<\/p>\n<p>import pandas as pd<\/p>\n<p>df &#061; pd.read_csv(r&#034;..\/numpy\/data1.csv&#034;, encoding&#061;&#039;gbk&#039;)<br \/>\nna &#061; df.isnull()<\/p>\n<p>df1 &#061; df.fillna(&#039;1&#039;)<br \/>\ndf2 &#061; df.dropna()<br \/>\nprint(df2)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"580\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260201143313-697f642961df3.png\" width=\"1173\" \/><br \/>\n\u2022 fillna()&#xff1a;\u9002\u5408\u7f3a\u5931\u503c\u8f83\u5c11&#xff0c;\u4e14\u53ef\u4ee5\u7528\u9ed8\u8ba4\u503c\u6216\u7edf\u8ba1\u503c\u586b\u5145\u7684\u573a\u666f\u3002<\/p>\n<p>\u2022 dropna()&#xff1a;\u9002\u5408\u7f3a\u5931\u503c\u6bd4\u4f8b\u8f83\u9ad8&#xff0c;\u5220\u9664\u540e\u4e0d\u5f71\u54cd\u6574\u4f53\u5206\u6790\u7684\u573a\u666f\u3002<br \/>\n\u00a0<\/p>\n<p>&#x1f3a8; \u4e8c\u3001Matplotlib&#xff1a;\u8ba9\u6570\u636e\u201c\u6d3b\u201d\u8d77\u6765<\/p>\n<p>\u5904\u7406\u5b8c\u6570\u636e&#xff0c;\u4e0b\u4e00\u6b65\u5c31\u662f\u628a\u5b83\u53d8\u6210\u76f4\u89c2\u7684\u56fe\u8868\u3002Matplotlib \u662f Python \u6700\u7ecf\u5178\u7684\u53ef\u89c6\u5316\u5e93&#xff0c;\u4e0a\u624b\u4e5f\u5f88\u5feb\u3002<\/p>\n<p>1. \u57fa\u7840\u6563\u70b9\u56fe\u6563\u70b9\u56fe\u53ef\u4ee5\u6e05\u6670\u5730\u5c55\u793a\u4e24\u4e2a\u53d8\u91cf\u4e4b\u95f4\u7684\u5173\u7cfb&#xff0c;\u7528 plot() \u51fd\u6570\u5c31\u80fd\u5feb\u901f\u5b9e\u73b0\u3002<\/p>\n<p>import matplotlib.pyplot as plt<br \/>\nimport numpy as np<br \/>\nx &#061; np.array([1, 2, 3, 4, 5])<br \/>\ny &#061; np.array([10, 20, 25, 30, 40])<br \/>\nplt.plot(x, y, color&#061;&#039;red&#039;, marker&#061;&#039;*&#039;)<br \/>\nplt.title(&#039;Scatter Plot Example&#039;)<br \/>\nplt.xlabel(&#039;X Axis&#039;)<br \/>\nplt.ylabel(&#039;Y Axis&#039;)<br \/>\nplt.show()<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"788\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260201143313-697f6429a4aad.png\" width=\"1403\" \/><br \/>\n\u8fd0\u884c\u8fd9\u6bb5\u4ee3\u7801&#xff0c;\u4f60\u5c31\u80fd\u770b\u5230\u4e00\u4e2a\u5e26\u661f\u578b\u6807\u8bb0\u7684\u7ea2\u8272\u6563\u70b9\u56fe&#xff0c;\u975e\u5e38\u76f4\u89c2\u3002<\/p>\n<p>2. \u591a\u56fe\u5e03\u5c40<\/p>\n<p>\u5982\u679c\u60f3\u5728\u4e00\u5f20\u56fe\u91cc\u5c55\u793a\u591a\u4e2a\u56fe\u8868&#xff0c;subplots() \u662f\u4e2a\u597d\u5e2e\u624b\u3002\u6211\u7528\u5b83\u753b\u4e86\u56db\u4e2a\u4e09\u89d2\u51fd\u6570\u7684\u5bf9\u6bd4\u56fe&#xff1a;<\/p>\n<p>import numpy as np<br \/>\nx &#061; np.linspace(0, 10, 10000)#<br \/>\ny1 &#061; np.sin(x)<br \/>\ny2 &#061; np.cos(x)<br \/>\ny3 &#061; np.tan(x)<br \/>\ny4 &#061; np.sin(x ** 2)<br \/>\nfig, axs &#061; plt.subplots(2, 2, figsize&#061;(10, 8))#<br \/>\naxs[0, 0].plot(x, y1, &#039;r&#039;)<br \/>\naxs[0, 0].set_title(&#039;sin(x)&#039;)<br \/>\naxs[0, 1].plot(x, y2, &#039;g&#039;)<\/p>\n<p>axs[0, 1].set_title(&#039;cos(x)&#039;)<br \/>\naxs[1, 0].plot(x, y3, &#039;b&#039;)<br \/>\naxs[1, 0].set_title(&#039;tan(x)&#039;)<br \/>\naxs[1, 1].plot(x, y4, &#039;m&#039;)<br \/>\naxs[1, 1].set_title(&#039;sin(x^2)&#039;)<br \/>\nplt.show()<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"787\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260201143314-697f642a103e5.png\" width=\"1547\" \/><br \/>\n\u8fd9\u6837&#xff0c;\u6211\u5c31\u80fd\u5728\u4e00\u4e2a\u753b\u5e03\u4e0a\u540c\u65f6\u5bf9\u6bd4\u6b63\u5f26\u3001\u4f59\u5f26\u3001\u6b63\u5207\u548c\u6b63\u5f26\u5e73\u65b9\u51fd\u6570\u7684\u66f2\u7ebf\u53d8\u5316&#xff0c;\u4e00\u76ee\u4e86\u7136\u3002<\/p>\n<\/p>\n<p>\u2728 \u5199\u5728\u6700\u540e<\/p>\n<p>\u4ece\u6570\u636e\u5904\u7406\u5230\u53ef\u89c6\u5316&#xff0c;\u8fd9\u4e00\u5957\u6d41\u7a0b\u8d70\u4e0b\u6765&#xff0c;\u6211\u6df1\u523b\u4f53\u4f1a\u5230 Python \u6570\u636e\u5206\u6790\u7684\u9b45\u529b\u3002Pandas \u8ba9\u6211\u4eec\u80fd\u9ad8\u6548\u5730\u6e05\u6d17\u548c\u6574\u7406\u6570\u636e&#xff0c;\u800c Matplotlib \u5219\u8ba9\u8fd9\u4e9b\u6570\u636e\u53d8\u6210\u4e86\u4f1a\u8bf4\u8bdd\u7684\u56fe\u8868\u3002<\/p>\n<p>\u8fd9\u4e9b\u53ea\u662f\u5165\u95e8\u7ea7\u7684\u64cd\u4f5c&#xff0c;\u4f46\u5b83\u4eec\u662f\u6570\u636e\u5206\u6790\u7684\u57fa\u77f3\u3002\u968f\u7740\u5b66\u4e60\u7684\u6df1\u5165&#xff0c;\u6211\u8fd8\u4f1a\u63a2\u7d22\u66f4\u591a\u8fdb\u9636\u6280\u5de7&#xff0c;\u6bd4\u5982\u7528 Seaborn \u753b\u66f4\u6f02\u4eae\u7684\u56fe&#xff0c;\u6216\u8005\u7528 Scikit-learn \u505a\u673a\u5668\u5b66\u4e60\u9884\u6d4b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u5728\u5b66\u4e60 Python \u6570\u636e\u5206\u6790&#xff0c;\u6211\u7528 PyCharm \u5199\u4e86\u51e0\u6bb5\u4ee3\u7801&#xff0c;\u628a\u4ece\u6570\u636e\u6e05\u6d17\u5230\u53ef\u89c6\u5316\u7684\u5b8c\u6574\u6d41\u7a0b\u8dd1\u4e86\u4e00\u904d\u3002\u4eca\u5929\u5c31\u6765\u5206\u4eab\u4e00\u4e0b\u6211\u7684\u5b9e\u6218\u5fc3\u5f97&#xff0c;\u5e0c\u671b\u80fd\u5e2e\u5230\u521a\u5165\u95e8\u7684\u670b\u53cb\u3002&#x1f4ca; \u4e00\u3001Pandas&#xff1a;\u6570\u636e\u5904\u7406\u7684\u57fa\u77f3\u6570\u636e\u5206\u6790\u7684\u7b2c\u4e00\u6b65&#xff0c;\u6c38\u8fdc\u662f\u5904\u7406\u539f\u59cb\u6570\u636e\u3002Pandas \u4f5c\u4e3a Python \u6570\u636e\u5206\u6790\u7684\u6838\u5fc3\u5e93&#xff0c;\u8ba9\u8fd9\u4e2a\u8fc7\u7a0b\u53d8\u5f97\u975e\u5e38\u9ad8\u6548\u30021. \u521b\u5efa\u4e0e\u67e5\u770b DataFrame\u6211\u4eec\u53ef\u4ee5\u7528\u5b57\u5178\u5feb\u901f\u6784\u9020\u4e00\u4e2a\u6570<\/p>\n","protected":false},"author":2,"featured_media":70381,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2468,4278],"topic":[],"class_list":["post-70386","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-matplotlib","tag-pandas"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6570\u636e\u201c\u6574\u5bb9\u201d\u672f\uff1aPandas+Matplotlib\u8ba9\u4f60\u7684\u6570\u636e\u4f1a\u8bf4\u8bdd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/70386.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6570\u636e\u201c\u6574\u5bb9\u201d\u672f\uff1aPandas+Matplotlib\u8ba9\u4f60\u7684\u6570\u636e\u4f1a\u8bf4\u8bdd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6700\u8fd1\u5728\u5b66\u4e60 Python \u6570\u636e\u5206\u6790&#xff0c;\u6211\u7528 PyCharm \u5199\u4e86\u51e0\u6bb5\u4ee3\u7801&#xff0c;\u628a\u4ece\u6570\u636e\u6e05\u6d17\u5230\u53ef\u89c6\u5316\u7684\u5b8c\u6574\u6d41\u7a0b\u8dd1\u4e86\u4e00\u904d\u3002\u4eca\u5929\u5c31\u6765\u5206\u4eab\u4e00\u4e0b\u6211\u7684\u5b9e\u6218\u5fc3\u5f97&#xff0c;\u5e0c\u671b\u80fd\u5e2e\u5230\u521a\u5165\u95e8\u7684\u670b\u53cb\u3002&#x1f4ca; \u4e00\u3001Pandas&#xff1a;\u6570\u636e\u5904\u7406\u7684\u57fa\u77f3\u6570\u636e\u5206\u6790\u7684\u7b2c\u4e00\u6b65&#xff0c;\u6c38\u8fdc\u662f\u5904\u7406\u539f\u59cb\u6570\u636e\u3002Pandas \u4f5c\u4e3a Python \u6570\u636e\u5206\u6790\u7684\u6838\u5fc3\u5e93&#xff0c;\u8ba9\u8fd9\u4e2a\u8fc7\u7a0b\u53d8\u5f97\u975e\u5e38\u9ad8\u6548\u30021. \u521b\u5efa\u4e0e\u67e5\u770b DataFrame\u6211\u4eec\u53ef\u4ee5\u7528\u5b57\u5178\u5feb\u901f\u6784\u9020\u4e00\u4e2a\u6570\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/70386.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-01T14:33:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260201143312-697f64288ad61.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/70386.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/70386.html\",\"name\":\"\u6570\u636e\u201c\u6574\u5bb9\u201d\u672f\uff1aPandas+Matplotlib\u8ba9\u4f60\u7684\u6570\u636e\u4f1a\u8bf4\u8bdd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-01T14:33:15+00:00\",\"dateModified\":\"2026-02-01T14:33:15+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/70386.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/70386.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/70386.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6570\u636e\u201c\u6574\u5bb9\u201d\u672f\uff1aPandas+Matplotlib\u8ba9\u4f60\u7684\u6570\u636e\u4f1a\u8bf4\u8bdd\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u6570\u636e\u201c\u6574\u5bb9\u201d\u672f\uff1aPandas+Matplotlib\u8ba9\u4f60\u7684\u6570\u636e\u4f1a\u8bf4\u8bdd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/70386.html","og_locale":"zh_CN","og_type":"article","og_title":"\u6570\u636e\u201c\u6574\u5bb9\u201d\u672f\uff1aPandas+Matplotlib\u8ba9\u4f60\u7684\u6570\u636e\u4f1a\u8bf4\u8bdd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6700\u8fd1\u5728\u5b66\u4e60 Python \u6570\u636e\u5206\u6790&#xff0c;\u6211\u7528 PyCharm \u5199\u4e86\u51e0\u6bb5\u4ee3\u7801&#xff0c;\u628a\u4ece\u6570\u636e\u6e05\u6d17\u5230\u53ef\u89c6\u5316\u7684\u5b8c\u6574\u6d41\u7a0b\u8dd1\u4e86\u4e00\u904d\u3002\u4eca\u5929\u5c31\u6765\u5206\u4eab\u4e00\u4e0b\u6211\u7684\u5b9e\u6218\u5fc3\u5f97&#xff0c;\u5e0c\u671b\u80fd\u5e2e\u5230\u521a\u5165\u95e8\u7684\u670b\u53cb\u3002&#x1f4ca; \u4e00\u3001Pandas&#xff1a;\u6570\u636e\u5904\u7406\u7684\u57fa\u77f3\u6570\u636e\u5206\u6790\u7684\u7b2c\u4e00\u6b65&#xff0c;\u6c38\u8fdc\u662f\u5904\u7406\u539f\u59cb\u6570\u636e\u3002Pandas \u4f5c\u4e3a Python \u6570\u636e\u5206\u6790\u7684\u6838\u5fc3\u5e93&#xff0c;\u8ba9\u8fd9\u4e2a\u8fc7\u7a0b\u53d8\u5f97\u975e\u5e38\u9ad8\u6548\u30021. \u521b\u5efa\u4e0e\u67e5\u770b DataFrame\u6211\u4eec\u53ef\u4ee5\u7528\u5b57\u5178\u5feb\u901f\u6784\u9020\u4e00\u4e2a\u6570","og_url":"https:\/\/www.wsisp.com\/helps\/70386.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-01T14:33:15+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260201143312-697f64288ad61.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/70386.html","url":"https:\/\/www.wsisp.com\/helps\/70386.html","name":"\u6570\u636e\u201c\u6574\u5bb9\u201d\u672f\uff1aPandas+Matplotlib\u8ba9\u4f60\u7684\u6570\u636e\u4f1a\u8bf4\u8bdd - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-01T14:33:15+00:00","dateModified":"2026-02-01T14:33:15+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/70386.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/70386.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/70386.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u6570\u636e\u201c\u6574\u5bb9\u201d\u672f\uff1aPandas+Matplotlib\u8ba9\u4f60\u7684\u6570\u636e\u4f1a\u8bf4\u8bdd"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/70386","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=70386"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/70386\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/70381"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=70386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=70386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=70386"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=70386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}