{"id":1047865,"date":"2024-12-31T13:46:04","date_gmt":"2024-12-31T05:46:04","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1047865.html"},"modified":"2024-12-31T13:46:07","modified_gmt":"2024-12-31T05:46:07","slug":"python%e5%a6%82%e4%bd%95%e5%81%9a%e7%9b%b8%e5%85%b3%e6%80%a7%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1047865.html","title":{"rendered":"python\u5982\u4f55\u505a\u76f8\u5173\u6027\u5206\u6790"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/b971d5bf-7cb8-4ecd-863e-11135a9f7bca.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u5982\u4f55\u505a\u76f8\u5173\u6027\u5206\u6790\" \/><\/p>\n<p><p> <strong>\u5f00\u5934\u6bb5\u843d\uff1a<\/strong><\/p>\n<\/p>\n<p><p><strong>Python\u8fdb\u884c\u76f8\u5173\u6027\u5206\u6790\u7684\u65b9\u6cd5\u6709\uff1a\u4f7f\u7528Pandas\u8ba1\u7b97\u76f8\u5173\u7cfb\u6570\u3001\u4f7f\u7528SciPy\u8fdb\u884c\u7edf\u8ba1\u68c0\u9a8c\u3001\u4f7f\u7528Seaborn\u7ed8\u5236\u70ed\u56fe\u3001\u4f7f\u7528Statsmodels\u8fdb\u884c\u7ebf\u6027\u56de\u5f52\u3002<\/strong>\u5176\u4e2d\uff0c\u4f7f\u7528Pandas\u8ba1\u7b97\u76f8\u5173\u7cfb\u6570\u662f\u6700\u57fa\u7840\u4e14\u5e38\u7528\u7684\u65b9\u6cd5\u3002\u5177\u4f53\u6765\u8bf4\uff0cPandas\u5e93\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u51fd\u6570<code>corr()<\/code>\uff0c\u53ef\u4ee5\u8ba1\u7b97DataFrame\u4e2d\u6bcf\u4e2a\u53d8\u91cf\u4e4b\u95f4\u7684\u76f8\u5173\u7cfb\u6570\u3002\u76f8\u5173\u7cfb\u6570\u7528\u4e8e\u8861\u91cf\u4e24\u4e2a\u53d8\u91cf\u4e4b\u95f4\u7684\u7ebf\u6027\u5173\u7cfb\uff0c\u503c\u7684\u8303\u56f4\u5728-1\u52301\u4e4b\u95f4\uff0c1\u8868\u793a\u5b8c\u5168\u6b63\u76f8\u5173\uff0c-1\u8868\u793a\u5b8c\u5168\u8d1f\u76f8\u5173\uff0c0\u8868\u793a\u6ca1\u6709\u7ebf\u6027\u5173\u7cfb\u3002\u901a\u8fc7\u4f7f\u7528Pandas\u8ba1\u7b97\u76f8\u5173\u7cfb\u6570\uff0c\u53ef\u4ee5\u5feb\u901f\u4e86\u89e3\u6570\u636e\u96c6\u4e2d\u53d8\u91cf\u4e4b\u95f4\u7684\u5173\u7cfb\uff0c\u8fd9\u5bf9\u4e8e\u6570\u636e\u5206\u6790\u548c\u5efa\u6a21\u975e\u5e38\u6709\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<hr>\n<p><h2>\u4e00\u3001\u4f7f\u7528Pandas\u8ba1\u7b97\u76f8\u5173\u7cfb\u6570<\/h2>\n<\/p>\n<p><p>Pandas\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u6570\u636e\u5904\u7406\u5e93\uff0c\u5e7f\u6cdb\u5e94\u7528\u4e8e\u6570\u636e\u5206\u6790\u9886\u57df\u3002\u4f7f\u7528Pandas\u8ba1\u7b97\u76f8\u5173\u7cfb\u6570\u975e\u5e38\u65b9\u4fbf\uff0c\u4ee5\u4e0b\u662f\u5177\u4f53\u7684\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><h3>1\u3001\u52a0\u8f7d\u6570\u636e<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u9700\u8981\u52a0\u8f7d\u6570\u636e\u5230Pandas DataFrame\u4e2d\u3002\u6570\u636e\u53ef\u4ee5\u4ece\u5404\u79cd\u6765\u6e90\u52a0\u8f7d\uff0c\u5305\u62ecCSV\u6587\u4ef6\u3001Excel\u6587\u4ef6\u3001SQL\u6570\u636e\u5e93\u7b49\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff0c\u6f14\u793a\u5982\u4f55\u4eceCSV\u6587\u4ef6\u52a0\u8f7d\u6570\u636e\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<h2><strong>\u8bfb\u53d6CSV\u6587\u4ef6<\/strong><\/h2>\n<p>data = pd.read_csv(&#39;data.csv&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u8ba1\u7b97\u76f8\u5173\u7cfb\u6570<\/h3>\n<\/p>\n<p><p>\u52a0\u8f7d\u6570\u636e\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528Pandas\u7684<code>corr()<\/code>\u51fd\u6570\u8ba1\u7b97\u76f8\u5173\u7cfb\u6570\u3002\u8be5\u51fd\u6570\u9ed8\u8ba4\u8ba1\u7b97\u76ae\u5c14\u900a\u76f8\u5173\u7cfb\u6570\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u8ba1\u7b97\u76f8\u5173\u7cfb\u6570<\/p>\n<p>correlation_matrix = data.corr()<\/p>\n<p>print(correlation_matrix)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>corr()<\/code>\u51fd\u6570\u8fd4\u56de\u4e00\u4e2aDataFrame\uff0c\u5305\u542b\u53d8\u91cf\u4e4b\u95f4\u7684\u76f8\u5173\u7cfb\u6570\u77e9\u9635\u3002<\/p>\n<\/p>\n<p><h3>3\u3001\u89e3\u91ca\u76f8\u5173\u7cfb\u6570<\/h3>\n<\/p>\n<p><p>\u76f8\u5173\u7cfb\u6570\u77e9\u9635\u63d0\u4f9b\u4e86\u6bcf\u5bf9\u53d8\u91cf\u4e4b\u95f4\u7684\u76f8\u5173\u6027\u4fe1\u606f\u3002\u76f8\u5173\u7cfb\u6570\u7684\u503c\u8303\u56f4\u5728-1\u52301\u4e4b\u95f4\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>1\u8868\u793a\u5b8c\u5168\u6b63\u76f8\u5173<\/strong>\uff1a\u4e00\u4e2a\u53d8\u91cf\u589e\u52a0\uff0c\u53e6\u4e00\u4e2a\u53d8\u91cf\u4e5f\u589e\u52a0\u3002<\/li>\n<li><strong>-1\u8868\u793a\u5b8c\u5168\u8d1f\u76f8\u5173<\/strong>\uff1a\u4e00\u4e2a\u53d8\u91cf\u589e\u52a0\uff0c\u53e6\u4e00\u4e2a\u53d8\u91cf\u51cf\u5c11\u3002<\/li>\n<li><strong>0\u8868\u793a\u6ca1\u6709\u7ebf\u6027\u5173\u7cfb<\/strong>\uff1a\u53d8\u91cf\u4e4b\u95f4\u6ca1\u6709\u7ebf\u6027\u5173\u7cfb\u3002<\/li>\n<\/ul>\n<p><p>\u901a\u8fc7\u5206\u6790\u76f8\u5173\u7cfb\u6570\u77e9\u9635\uff0c\u53ef\u4ee5\u8bc6\u522b\u51fa\u54ea\u4e9b\u53d8\u91cf\u4e4b\u95f4\u5b58\u5728\u663e\u8457\u7684\u7ebf\u6027\u5173\u7cfb\uff0c\u4ece\u800c\u4e3a\u540e\u7eed\u7684\u5206\u6790\u548c\u5efa\u6a21\u63d0\u4f9b\u6307\u5bfc\u3002<\/p>\n<\/p>\n<p><h2>\u4e8c\u3001\u4f7f\u7528SciPy\u8fdb\u884c\u7edf\u8ba1\u68c0\u9a8c<\/h2>\n<\/p>\n<p><p>SciPy\u662f\u4e00\u4e2a\u5f00\u6e90\u7684Python\u5e93\uff0c\u63d0\u4f9b\u4e86\u8bb8\u591a\u79d1\u5b66\u8ba1\u7b97\u529f\u80fd\uff0c\u5305\u62ec\u7edf\u8ba1\u68c0\u9a8c\u3002\u4f7f\u7528SciPy\u53ef\u4ee5\u8fdb\u884c\u5404\u79cd\u76f8\u5173\u6027\u68c0\u9a8c\uff0c\u5982\u76ae\u5c14\u900a\u76f8\u5173\u7cfb\u6570\u68c0\u9a8c\u3001\u65af\u76ae\u5c14\u66fc\u76f8\u5173\u7cfb\u6570\u68c0\u9a8c\u7b49\u3002<\/p>\n<\/p>\n<p><h3>1\u3001\u76ae\u5c14\u900a\u76f8\u5173\u7cfb\u6570\u68c0\u9a8c<\/h3>\n<\/p>\n<p><p>\u76ae\u5c14\u900a\u76f8\u5173\u7cfb\u6570\u68c0\u9a8c\u7528\u4e8e\u6d4b\u91cf\u4e24\u4e2a\u8fde\u7eed\u53d8\u91cf\u4e4b\u95f4\u7684\u7ebf\u6027\u5173\u7cfb\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff0c\u6f14\u793a\u5982\u4f55\u4f7f\u7528SciPy\u8ba1\u7b97\u76ae\u5c14\u900a\u76f8\u5173\u7cfb\u6570\u53ca\u5176\u663e\u8457\u6027\u6c34\u5e73\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from scipy.stats import pearsonr<\/p>\n<h2><strong>\u5047\u8bbe\u6709\u4e24\u4e2a\u53d8\u91cfx\u548cy<\/strong><\/h2>\n<p>x = data[&#39;variable1&#39;]<\/p>\n<p>y = data[&#39;variable2&#39;]<\/p>\n<h2><strong>\u8ba1\u7b97\u76ae\u5c14\u900a\u76f8\u5173\u7cfb\u6570\u53ca\u5176\u663e\u8457\u6027\u6c34\u5e73<\/strong><\/h2>\n<p>corr, p_value = pearsonr(x, y)<\/p>\n<p>print(f&#39;\u76ae\u5c14\u900a\u76f8\u5173\u7cfb\u6570: {corr}, p\u503c: {p_value}&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u65af\u76ae\u5c14\u66fc\u76f8\u5173\u7cfb\u6570\u68c0\u9a8c<\/h3>\n<\/p>\n<p><p>\u65af\u76ae\u5c14\u66fc\u76f8\u5173\u7cfb\u6570\u68c0\u9a8c\u7528\u4e8e\u6d4b\u91cf\u4e24\u4e2a\u53d8\u91cf\u4e4b\u95f4\u7684\u5355\u8c03\u5173\u7cfb\uff0c\u4e0d\u8981\u6c42\u53d8\u91cf\u6ee1\u8db3\u6b63\u6001\u5206\u5e03\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff0c\u6f14\u793a\u5982\u4f55\u4f7f\u7528SciPy\u8ba1\u7b97\u65af\u76ae\u5c14\u66fc\u76f8\u5173\u7cfb\u6570\u53ca\u5176\u663e\u8457\u6027\u6c34\u5e73\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from scipy.stats import spearmanr<\/p>\n<h2><strong>\u8ba1\u7b97\u65af\u76ae\u5c14\u66fc\u76f8\u5173\u7cfb\u6570\u53ca\u5176\u663e\u8457\u6027\u6c34\u5e73<\/strong><\/h2>\n<p>corr, p_value = spearmanr(x, y)<\/p>\n<p>print(f&#39;\u65af\u76ae\u5c14\u66fc\u76f8\u5173\u7cfb\u6570: {corr}, p\u503c: {p_value}&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4f7f\u7528SciPy\u8fdb\u884c\u7edf\u8ba1\u68c0\u9a8c\uff0c\u53ef\u4ee5\u4e0d\u4ec5\u5f97\u5230\u76f8\u5173\u7cfb\u6570\uff0c\u8fd8\u53ef\u4ee5\u5f97\u5230\u5176\u663e\u8457\u6027\u6c34\u5e73\uff08p\u503c\uff09\uff0c\u4ece\u800c\u5224\u65ad\u76f8\u5173\u6027\u662f\u5426\u663e\u8457\u3002<\/p>\n<\/p>\n<p><h2>\u4e09\u3001\u4f7f\u7528Seaborn\u7ed8\u5236\u70ed\u56fe<\/h2>\n<\/p>\n<p><p>Seaborn\u662f\u4e00\u4e2a\u57fa\u4e8eMatplotlib\u7684\u9ad8\u7ea7\u6570\u636e\u53ef\u89c6\u5316\u5e93\uff0c\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u7ed8\u56fe\u529f\u80fd\u3002\u4f7f\u7528Seaborn\u53ef\u4ee5\u5f88\u65b9\u4fbf\u5730\u7ed8\u5236\u76f8\u5173\u7cfb\u6570\u70ed\u56fe\uff0c\u76f4\u89c2\u5c55\u793a\u53d8\u91cf\u4e4b\u95f4\u7684\u76f8\u5173\u6027\u3002<\/p>\n<\/p>\n<p><h3>1\u3001\u7ed8\u5236\u76f8\u5173\u7cfb\u6570\u70ed\u56fe<\/h3>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff0c\u6f14\u793a\u5982\u4f55\u4f7f\u7528Seaborn\u7ed8\u5236\u76f8\u5173\u7cfb\u6570\u70ed\u56fe\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import seaborn as sns<\/p>\n<p>import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u8ba1\u7b97\u76f8\u5173\u7cfb\u6570\u77e9\u9635<\/strong><\/h2>\n<p>correlation_matrix = data.corr()<\/p>\n<h2><strong>\u7ed8\u5236\u70ed\u56fe<\/strong><\/h2>\n<p>sns.heatmap(correlation_matrix, annot=True, cmap=&#39;coolwarm&#39;)<\/p>\n<p>plt.title(&#39;\u76f8\u5173\u7cfb\u6570\u70ed\u56fe&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u89e3\u91ca\u70ed\u56fe<\/h3>\n<\/p>\n<p><p>\u70ed\u56fe\u4f7f\u7528\u989c\u8272\u7f16\u7801\u8868\u793a\u76f8\u5173\u7cfb\u6570\u7684\u5927\u5c0f\u548c\u65b9\u5411\u3002\u901a\u5e38\uff0c\u989c\u8272\u8d8a\u6df1\u8868\u793a\u76f8\u5173\u6027\u8d8a\u5f3a\uff0c\u6b63\u76f8\u5173\u548c\u8d1f\u76f8\u5173\u4f7f\u7528\u4e0d\u540c\u7684\u989c\u8272\u8868\u793a\u3002\u901a\u8fc7\u70ed\u56fe\uff0c\u53ef\u4ee5\u76f4\u89c2\u5730\u89c2\u5bdf\u5230\u6570\u636e\u96c6\u4e2d\u54ea\u4e9b\u53d8\u91cf\u4e4b\u95f4\u5177\u6709\u663e\u8457\u7684\u76f8\u5173\u6027\u3002<\/p>\n<\/p>\n<p><h2>\u56db\u3001\u4f7f\u7528Statsmodels\u8fdb\u884c\u7ebf\u6027\u56de\u5f52<\/h2>\n<\/p>\n<p><p>Statsmodels\u662f\u4e00\u4e2a\u63d0\u4f9b\u7edf\u8ba1\u6a21\u578b\u4f30\u8ba1\u548c\u63a8\u65ad\u7684Python\u5e93\uff0c\u652f\u6301\u5404\u79cd\u56de\u5f52\u5206\u6790\u3002\u4f7f\u7528Statsmodels\u53ef\u4ee5\u8fdb\u884c\u7ebf\u6027\u56de\u5f52\u5206\u6790\uff0c\u8fdb\u4e00\u6b65\u63a2\u7d22\u53d8\u91cf\u4e4b\u95f4\u7684\u5173\u7cfb\u3002<\/p>\n<\/p>\n<p><h3>1\u3001\u5efa\u7acb\u7ebf\u6027\u56de\u5f52\u6a21\u578b<\/h3>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u793a\u4f8b\u4ee3\u7801\uff0c\u6f14\u793a\u5982\u4f55\u4f7f\u7528Statsmodels\u5efa\u7acb\u7ebf\u6027\u56de\u5f52\u6a21\u578b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import statsmodels.api as sm<\/p>\n<h2><strong>\u5047\u8bbe\u8981\u7814\u7a76\u53d8\u91cfx\u548cy\u4e4b\u95f4\u7684\u7ebf\u6027\u5173\u7cfb<\/strong><\/h2>\n<p>x = data[&#39;variable1&#39;]<\/p>\n<p>y = data[&#39;variable2&#39;]<\/p>\n<h2><strong>\u6dfb\u52a0\u5e38\u6570\u9879<\/strong><\/h2>\n<p>x = sm.add_constant(x)<\/p>\n<h2><strong>\u5efa\u7acb\u7ebf\u6027\u56de\u5f52\u6a21\u578b<\/strong><\/h2>\n<p>model = sm.OLS(y, x).fit()<\/p>\n<h2><strong>\u8f93\u51fa\u6a21\u578b\u6458\u8981<\/strong><\/h2>\n<p>print(model.summary())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>2\u3001\u89e3\u91ca\u56de\u5f52\u7ed3\u679c<\/h3>\n<\/p>\n<p><p>\u7ebf\u6027\u56de\u5f52\u6a21\u578b\u7684\u6458\u8981\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u4fe1\u606f\uff0c\u5305\u62ec\u56de\u5f52\u7cfb\u6570\u3001R\u5e73\u65b9\u503c\u3001p\u503c\u7b49\u3002\u901a\u8fc7\u5206\u6790\u56de\u5f52\u7ed3\u679c\uff0c\u53ef\u4ee5\u4e86\u89e3\u81ea\u53d8\u91cf\u5bf9\u56e0\u53d8\u91cf\u7684\u5f71\u54cd\u53ca\u5176\u663e\u8457\u6027\u3002<\/p>\n<\/p>\n<hr>\n<p><p>\u7efc\u4e0a\u6240\u8ff0\uff0cPython\u63d0\u4f9b\u4e86\u591a\u79cd\u5de5\u5177\u548c\u5e93\u7528\u4e8e\u76f8\u5173\u6027\u5206\u6790\uff0c\u5305\u62ecPandas\u3001SciPy\u3001Seaborn\u548cStatsmodels\u3002\u4f7f\u7528Pandas\u53ef\u4ee5\u5feb\u901f\u8ba1\u7b97\u76f8\u5173\u7cfb\u6570\uff0c\u4f7f\u7528SciPy\u53ef\u4ee5\u8fdb\u884c\u7edf\u8ba1\u68c0\u9a8c\uff0c\u4f7f\u7528Seaborn\u53ef\u4ee5\u76f4\u89c2\u5730\u7ed8\u5236\u70ed\u56fe\uff0c\u4f7f\u7528Statsmodels\u53ef\u4ee5\u8fdb\u884c\u6df1\u5165\u7684\u56de\u5f52\u5206\u6790\u3002\u901a\u8fc7\u7ed3\u5408\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\uff0c\u53ef\u4ee5\u5168\u9762\u5206\u6790\u6570\u636e\u96c6\u4e2d\u53d8\u91cf\u4e4b\u95f4\u7684\u5173\u7cfb\uff0c\u4e3a\u6570\u636e\u5206\u6790\u548c\u5efa\u6a21\u63d0\u4f9b\u6709\u529b\u652f\u6301\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u8fdb\u884c\u76f8\u5173\u6027\u5206\u6790\uff1f<\/strong><br \/>\u5728Python\u4e2d\u8fdb\u884c\u76f8\u5173\u6027\u5206\u6790\u901a\u5e38\u4f7f\u7528Pandas\u5e93\u6765\u5904\u7406\u6570\u636e\uff0c\u7136\u540e\u5229\u7528NumPy\u6216SciPy\u5e93\u8ba1\u7b97\u76f8\u5173\u7cfb\u6570\u3002\u9996\u5148\uff0c\u60a8\u9700\u8981\u52a0\u8f7d\u6570\u636e\u5e76\u4f7f\u7528Pandas\u7684<code>corr()<\/code>\u51fd\u6570\u6765\u751f\u6210\u76f8\u5173\u6027\u77e9\u9635\u3002\u8be5\u77e9\u9635\u663e\u793a\u4e86\u53d8\u91cf\u4e4b\u95f4\u7684\u76f8\u5173\u7a0b\u5ea6\uff0c\u503c\u8303\u56f4\u4ece-1\u52301\uff0c\u8868\u793a\u5b8c\u5168\u8d1f\u76f8\u5173\u5230\u5b8c\u5168\u6b63\u76f8\u5173\u3002<\/p>\n<p><strong>\u53ef\u4ee5\u4f7f\u7528\u54ea\u4e9b\u5e93\u6765\u8fdb\u884c\u76f8\u5173\u6027\u5206\u6790\uff1f<\/strong><br \/>\u8fdb\u884c\u76f8\u5173\u6027\u5206\u6790\u65f6\uff0c\u4e3b\u8981\u4f7f\u7528\u7684\u5e93\u5305\u62ecPandas\u3001NumPy\u548cSciPy\u3002Pandas\u63d0\u4f9b\u6570\u636e\u5904\u7406\u80fd\u529b\uff0cNumPy\u652f\u6301\u6570\u503c\u8ba1\u7b97\uff0c\u800cSciPy\u5219\u63d0\u4f9b\u66f4\u590d\u6742\u7684\u7edf\u8ba1\u5206\u6790\u529f\u80fd\u3002\u6b64\u5916\uff0cMatplotlib\u548cSeaborn\u53ef\u4ee5\u7528\u6765\u53ef\u89c6\u5316\u76f8\u5173\u6027\u77e9\u9635\uff0c\u5e2e\u52a9\u66f4\u76f4\u89c2\u5730\u7406\u89e3\u6570\u636e\u4e4b\u95f4\u7684\u5173\u7cfb\u3002<\/p>\n<p><strong>\u5982\u4f55\u89e3\u91ca\u76f8\u5173\u6027\u5206\u6790\u7684\u7ed3\u679c\uff1f<\/strong><br \/>\u76f8\u5173\u6027\u5206\u6790\u7684\u7ed3\u679c\u901a\u5e38\u4ee5\u76f8\u5173\u7cfb\u6570\u7684\u5f62\u5f0f\u8868\u793a\uff0c\u503c\u5728-1\u52301\u4e4b\u95f4\u3002\u503c\u63a5\u8fd11\u610f\u5473\u7740\u4e24\u4e2a\u53d8\u91cf\u4e4b\u95f4\u6709\u5f3a\u6b63\u76f8\u5173\uff0c\u503c\u63a5\u8fd1-1\u5219\u8868\u793a\u5f3a\u8d1f\u76f8\u5173\u3002\u82e5\u503c\u63a5\u8fd10\uff0c\u5219\u8868\u660e\u53d8\u91cf\u4e4b\u95f4\u6ca1\u6709\u7ebf\u6027\u5173\u7cfb\u3002\u7136\u800c\uff0c\u76f8\u5173\u6027\u5e76\u4e0d\u4ee3\u8868\u56e0\u679c\u5173\u7cfb\uff0c\u56e0\u6b64\u5728\u89e3\u91ca\u7ed3\u679c\u65f6\u5e94\u8c28\u614e\uff0c\u7ed3\u5408\u5176\u4ed6\u5206\u6790\u65b9\u6cd5\u8fdb\u884c\u5168\u9762\u8bc4\u4f30\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5f00\u5934\u6bb5\u843d\uff1a Python\u8fdb\u884c\u76f8\u5173\u6027\u5206\u6790\u7684\u65b9\u6cd5\u6709\uff1a\u4f7f\u7528Pandas\u8ba1\u7b97\u76f8\u5173\u7cfb\u6570\u3001\u4f7f\u7528SciPy\u8fdb\u884c\u7edf\u8ba1\u68c0\u9a8c\u3001\u4f7f\u7528 [&hellip;]","protected":false},"author":3,"featured_media":1047870,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1047865"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1047865"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1047865\/revisions"}],"predecessor-version":[{"id":1047872,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1047865\/revisions\/1047872"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1047870"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1047865"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1047865"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1047865"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}