{"id":1127489,"date":"2025-01-08T20:10:45","date_gmt":"2025-01-08T12:10:45","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1127489.html"},"modified":"2025-01-08T20:10:47","modified_gmt":"2025-01-08T12:10:47","slug":"%e5%9b%bd%e9%99%85%e6%94%b6%e6%94%af%e5%b9%b3%e8%a1%a1%e8%a1%a8%e5%a6%82%e4%bd%95%e7%94%a8python","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1127489.html","title":{"rendered":"\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\u5982\u4f55\u7528python"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25094500\/8e6814fd-0f38-461c-8092-aabffc1a84cd.webp\" alt=\"\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\u5982\u4f55\u7528python\" \/><\/p>\n<p><p> <strong>\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\u5982\u4f55\u7528Python<\/strong><\/p>\n<\/p>\n<p><p><strong>\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\u662f\u4e00\u4e2a\u56fd\u5bb6\u7ecf\u6d4e\u6d3b\u52a8\u7684\u7efc\u5408\u8bb0\u5f55\uff0c\u5305\u62ec\u5546\u54c1\u3001\u670d\u52a1\u3001\u6536\u5165\u548c\u8d44\u672c\u7684\u8fdb\u51fa\u3002\u4e3a\u4e86\u4f7f\u7528Python\u6765\u5904\u7406\u548c\u5206\u6790\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\uff0c\u4f60\u9700\u8981\u638c\u63e1\u6570\u636e\u6293\u53d6\u3001\u6570\u636e\u5904\u7406\u548c\u6570\u636e\u53ef\u89c6\u5316\u7b49\u6280\u80fd\u3002<\/strong>\u5176\u4e2d\uff0c\u6570\u636e\u6293\u53d6\u662f\u4e00\u4e2a\u5173\u952e\u6b65\u9aa4\uff0c\u56e0\u4e3a\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\u7684\u6570\u636e\u901a\u5e38\u6765\u81ea\u4e8e\u4e0d\u540c\u7684\u5b98\u65b9\u7f51\u7ad9\u548c\u6570\u636e\u5e93\uff0c\u6bd4\u5982\u56fd\u9645\u8d27\u5e01\u57fa\u91d1\u7ec4\u7ec7(IMF)\u548c\u4e16\u754c\u94f6\u884c\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u5c06\u8be6\u7ec6\u63cf\u8ff0\u5982\u4f55\u7528Python\u8fdb\u884c\u6570\u636e\u6293\u53d6\u548c\u5206\u6790\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u6570\u636e\u6293\u53d6<\/h3>\n<\/p>\n<p><h4>1. \u4f7f\u7528API\u83b7\u53d6\u6570\u636e<\/h4>\n<\/p>\n<p><p>\u8bb8\u591a\u56fd\u9645\u7ec4\u7ec7\u63d0\u4f9bAPI\u63a5\u53e3\u6765\u83b7\u53d6\u7ecf\u6d4e\u6570\u636e\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u4f7f\u7528Python\u4eceIMF\u83b7\u53d6\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\u6570\u636e\u7684\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>import pandas as pd<\/p>\n<h2><strong>\u8bbe\u7f6eAPI\u5730\u5740\u548c\u8bf7\u6c42\u53c2\u6570<\/strong><\/h2>\n<p>url = &#39;https:\/\/api.worldbank.org\/v2\/country\/all\/indicator\/BN.CAB.XOKA.CD?format=json&amp;date=2000:2020&#39;<\/p>\n<p>response = requests.get(url)<\/p>\n<h2><strong>\u5c06\u6570\u636e\u8f6c\u6362\u4e3aDataFrame<\/strong><\/h2>\n<p>data = response.json()<\/p>\n<p>df = pd.json_normalize(data[1])<\/p>\n<h2><strong>\u68c0\u67e5\u6570\u636e<\/strong><\/h2>\n<p>print(df.head())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f7f\u7528Web Scraping\u6293\u53d6\u6570\u636e<\/h4>\n<\/p>\n<p><p>\u6709\u65f6API\u63a5\u53e3\u4e0d\u591f\u7528\uff0c\u53ef\u80fd\u9700\u8981\u4ece\u7f51\u9875\u4e0a\u6293\u53d6\u6570\u636e\u3002\u53ef\u4ee5\u4f7f\u7528BeautifulSoup\u548cSelenium\u6765\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from bs4 import BeautifulSoup<\/p>\n<p>from selenium import webdriver<\/p>\n<p>import pandas as pd<\/p>\n<h2><strong>\u8bbe\u7f6e\u6d4f\u89c8\u5668\u9a71\u52a8<\/strong><\/h2>\n<p>driver = webdriver.Chrome(executable_path=&#39;\/path\/to\/chromedriver&#39;)<\/p>\n<h2><strong>\u6253\u5f00\u76ee\u6807\u7f51\u7ad9<\/strong><\/h2>\n<p>driver.get(&#39;https:\/\/example.com\/international-balance-sheet&#39;)<\/p>\n<h2><strong>\u83b7\u53d6\u7f51\u9875\u5185\u5bb9<\/strong><\/h2>\n<p>content = driver.page_source<\/p>\n<p>soup = BeautifulSoup(content, &#39;html.parser&#39;)<\/p>\n<h2><strong>\u63d0\u53d6\u6570\u636e<\/strong><\/h2>\n<p>table = soup.find(&#39;table&#39;, {&#39;id&#39;: &#39;balance-sheet&#39;})<\/p>\n<p>rows = table.find_all(&#39;tr&#39;)<\/p>\n<h2><strong>\u5c06\u6570\u636e\u5b58\u50a8\u5230DataFrame\u4e2d<\/strong><\/h2>\n<p>data = []<\/p>\n<p>for row in rows:<\/p>\n<p>    cols = row.find_all(&#39;td&#39;)<\/p>\n<p>    data.append([col.text for col in cols])<\/p>\n<p>df = pd.DataFrame(data, columns=[&#39;Year&#39;, &#39;Exports&#39;, &#39;Imports&#39;, &#39;Balance&#39;])<\/p>\n<h2><strong>\u68c0\u67e5\u6570\u636e<\/strong><\/h2>\n<p>print(df.head())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u6570\u636e\u5904\u7406<\/h3>\n<\/p>\n<p><h4>1. \u6570\u636e\u6e05\u6d17<\/h4>\n<\/p>\n<p><p>\u6570\u636e\u6293\u53d6\u540e\uff0c\u901a\u5e38\u9700\u8981\u8fdb\u884c\u6e05\u6d17\u4ee5\u786e\u4fdd\u6570\u636e\u8d28\u91cf\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u6570\u636e\u6e05\u6d17\u64cd\u4f5c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5220\u9664\u7f3a\u5931\u503c<\/p>\n<p>df = df.dropna()<\/p>\n<h2><strong>\u8f6c\u6362\u6570\u636e\u7c7b\u578b<\/strong><\/h2>\n<p>df[&#39;Year&#39;] = df[&#39;Year&#39;].astype(int)<\/p>\n<p>df[&#39;Exports&#39;] = df[&#39;Exports&#39;].astype(float)<\/p>\n<p>df[&#39;Imports&#39;] = df[&#39;Imports&#39;].astype(float)<\/p>\n<h2><strong>\u8ba1\u7b97\u65b0\u7684\u5217<\/strong><\/h2>\n<p>df[&#39;Balance&#39;] = df[&#39;Exports&#39;] - df[&#39;Imports&#39;]<\/p>\n<h2><strong>\u68c0\u67e5\u6570\u636e<\/strong><\/h2>\n<p>print(df.info())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u6570\u636e\u8f6c\u6362<\/h4>\n<\/p>\n<p><p>\u6709\u65f6\u9700\u8981\u5bf9\u6570\u636e\u8fdb\u884c\u8f6c\u6362\uff0c\u4ee5\u4fbf\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u5206\u6790\u548c\u53ef\u89c6\u5316\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528Pandas\u7684pivot_table\u529f\u80fd\u6765\u91cd\u7ec4\u6570\u636e\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">pivot_df = df.pivot_table(index=&#39;Year&#39;, values=[&#39;Exports&#39;, &#39;Imports&#39;, &#39;Balance&#39;], aggfunc=&#39;sum&#39;)<\/p>\n<h2><strong>\u68c0\u67e5\u6570\u636e<\/strong><\/h2>\n<p>print(pivot_df.head())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u6570\u636e\u5206\u6790<\/h3>\n<\/p>\n<p><h4>1. \u63cf\u8ff0\u6027\u7edf\u8ba1\u5206\u6790<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u53ef\u4ee5\u8fdb\u884c\u63cf\u8ff0\u6027\u7edf\u8ba1\u5206\u6790\uff0c\u4ee5\u83b7\u53d6\u6570\u636e\u7684\u57fa\u672c\u7279\u5f81\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u63cf\u8ff0\u6027\u7edf\u8ba1<\/p>\n<p>desc_stats = df.describe()<\/p>\n<h2><strong>\u68c0\u67e5\u7ed3\u679c<\/strong><\/h2>\n<p>print(desc_stats)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u65f6\u95f4\u5e8f\u5217\u5206\u6790<\/h4>\n<\/p>\n<p><p>\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\u6570\u636e\u901a\u5e38\u662f\u65f6\u95f4\u5e8f\u5217\u6570\u636e\uff0c\u9002\u5408\u8fdb\u884c\u65f6\u95f4\u5e8f\u5217\u5206\u6790\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u7ed8\u5236\u65f6\u95f4\u5e8f\u5217\u56fe<\/strong><\/h2>\n<p>plt.figure(figsize=(10, 6))<\/p>\n<p>plt.plot(df[&#39;Year&#39;], df[&#39;Exports&#39;], label=&#39;Exports&#39;)<\/p>\n<p>plt.plot(df[&#39;Year&#39;], df[&#39;Imports&#39;], label=&#39;Imports&#39;)<\/p>\n<p>plt.plot(df[&#39;Year&#39;], df[&#39;Balance&#39;], label=&#39;Balance&#39;)<\/p>\n<p>plt.xlabel(&#39;Year&#39;)<\/p>\n<p>plt.ylabel(&#39;Value&#39;)<\/p>\n<p>plt.title(&#39;International Balance Sheet Over Time&#39;)<\/p>\n<p>plt.legend()<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u6570\u636e\u53ef\u89c6\u5316<\/h3>\n<\/p>\n<p><p>\u6570\u636e\u53ef\u89c6\u5316\u662f\u7406\u89e3\u548c\u89e3\u91ca\u6570\u636e\u7684\u91cd\u8981\u5de5\u5177\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u7684\u53ef\u89c6\u5316\u6280\u672f\uff1a<\/p>\n<\/p>\n<p><h4>1. \u6298\u7ebf\u56fe<\/h4>\n<\/p>\n<p><p>\u6298\u7ebf\u56fe\u9002\u5408\u5c55\u793a\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u7684\u8d8b\u52bf\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import seaborn as sns<\/p>\n<h2><strong>\u8bbe\u7f6e\u7ed8\u56fe\u98ce\u683c<\/strong><\/h2>\n<p>sns.set(style=&quot;whitegrid&quot;)<\/p>\n<h2><strong>\u7ed8\u5236\u6298\u7ebf\u56fe<\/strong><\/h2>\n<p>plt.figure(figsize=(12, 8))<\/p>\n<p>sns.lineplot(x=&#39;Year&#39;, y=&#39;Exports&#39;, data=df, label=&#39;Exports&#39;)<\/p>\n<p>sns.lineplot(x=&#39;Year&#39;, y=&#39;Imports&#39;, data=df, label=&#39;Imports&#39;)<\/p>\n<p>sns.lineplot(x=&#39;Year&#39;, y=&#39;Balance&#39;, data=df, label=&#39;Balance&#39;)<\/p>\n<p>plt.xlabel(&#39;Year&#39;)<\/p>\n<p>plt.ylabel(&#39;Value&#39;)<\/p>\n<p>plt.title(&#39;International Balance Sheet Components&#39;)<\/p>\n<p>plt.legend()<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u70ed\u529b\u56fe<\/h4>\n<\/p>\n<p><p>\u70ed\u529b\u56fe\u53ef\u4ee5\u5e2e\u52a9\u8bc6\u522b\u6570\u636e\u4e2d\u7684\u6a21\u5f0f\u548c\u5f02\u5e38\u503c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u76f8\u5173\u77e9\u9635<\/p>\n<p>corr_matrix = df[[&#39;Exports&#39;, &#39;Imports&#39;, &#39;Balance&#39;]].corr()<\/p>\n<h2><strong>\u7ed8\u5236\u70ed\u529b\u56fe<\/strong><\/h2>\n<p>plt.figure(figsize=(8, 6))<\/p>\n<p>sns.heatmap(corr_matrix, annot=True, cmap=&#39;coolwarm&#39;)<\/p>\n<p>plt.title(&#39;Correlation Matrix&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u5e94\u7528<\/h3>\n<\/p>\n<p><h4>1. \u6570\u636e\u51c6\u5907<\/h4>\n<\/p>\n<p><p>\u5728\u8fdb\u884c\u673a\u5668\u5b66\u4e60\u5206\u6790\u4e4b\u524d\uff0c\u9700\u8981\u5bf9\u6570\u636e\u8fdb\u884c\u51c6\u5907\uff0c\u5305\u62ec\u7279\u5f81\u9009\u62e9\u548c\u6570\u636e\u6807\u51c6\u5316\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn.model_selection import tr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n_test_split<\/p>\n<p>from sklearn.preprocessing import StandardScaler<\/p>\n<h2><strong>\u7279\u5f81\u9009\u62e9<\/strong><\/h2>\n<p>X = df[[&#39;Year&#39;, &#39;Exports&#39;, &#39;Imports&#39;]]<\/p>\n<p>y = df[&#39;Balance&#39;]<\/p>\n<h2><strong>\u6570\u636e\u62c6\u5206<\/strong><\/h2>\n<p>X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)<\/p>\n<h2><strong>\u6570\u636e\u6807\u51c6\u5316<\/strong><\/h2>\n<p>scaler = StandardScaler()<\/p>\n<p>X_train = scaler.fit_transform(X_train)<\/p>\n<p>X_test = scaler.transform(X_test)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u6a21\u578b\u8bad\u7ec3\u548c\u8bc4\u4f30<\/h4>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u53ef\u4ee5\u4f7f\u7528\u673a\u5668\u5b66\u4e60\u6a21\u578b\u6765\u9884\u6d4b\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\u4e2d\u7684\u67d0\u4e9b\u6307\u6807\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn.linear_model import LinearRegression<\/p>\n<p>from sklearn.metrics import mean_squared_error, r2_score<\/p>\n<h2><strong>\u6a21\u578b\u8bad\u7ec3<\/strong><\/h2>\n<p>model = LinearRegression()<\/p>\n<p>model.fit(X_train, y_train)<\/p>\n<h2><strong>\u6a21\u578b\u9884\u6d4b<\/strong><\/h2>\n<p>y_pred = model.predict(X_test)<\/p>\n<h2><strong>\u6a21\u578b\u8bc4\u4f30<\/strong><\/h2>\n<p>mse = mean_squared_error(y_test, y_pred)<\/p>\n<p>r2 = r2_score(y_test, y_pred)<\/p>\n<p>print(f&#39;Mean Squared Error: {mse}&#39;)<\/p>\n<p>print(f&#39;R-squared: {r2}&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528Python\u5904\u7406\u548c\u5206\u6790\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\u6d89\u53ca\u6570\u636e\u6293\u53d6\u3001\u6570\u636e\u6e05\u6d17\u3001\u6570\u636e\u8f6c\u6362\u3001\u6570\u636e\u5206\u6790\u548c\u6570\u636e\u53ef\u89c6\u5316\u7b49\u591a\u4e2a\u6b65\u9aa4\u3002\u638c\u63e1\u8fd9\u4e9b\u6280\u80fd\u4e0d\u4ec5\u80fd\u591f\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u7406\u89e3\u7ecf\u6d4e\u6570\u636e\uff0c\u8fd8\u80fd\u4e3a\u51b3\u7b56\u63d0\u4f9b\u6709\u529b\u652f\u6301\u3002\u901a\u8fc7API\u83b7\u53d6\u6570\u636e\u3001\u4f7f\u7528Web Scraping\u6293\u53d6\u6570\u636e\u3001\u8fdb\u884c\u6570\u636e\u6e05\u6d17\u548c\u8f6c\u6362\u3001\u6267\u884c\u63cf\u8ff0\u6027\u7edf\u8ba1\u548c\u65f6\u95f4\u5e8f\u5217\u5206\u6790\u3001\u5e76\u5229\u7528\u673a\u5668\u5b66\u4e60\u6a21\u578b\u8fdb\u884c\u9884\u6d4b\uff0c\u4f60\u53ef\u4ee5\u5168\u9762\u5730\u5206\u6790\u548c\u89e3\u91ca\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\u6570\u636e\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u5904\u7406\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\u6570\u636e\uff1f<\/strong><br \/>\u5904\u7406\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\u7684\u6570\u636e\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528Python\u7684Pandas\u5e93\u6765\u5b9e\u73b0\u3002\u9996\u5148\uff0c\u60a8\u9700\u8981\u5c06\u6570\u636e\u5bfc\u5165\u4e3aDataFrame\uff0c\u4e4b\u540e\u53ef\u4ee5\u8fdb\u884c\u6570\u636e\u6e05\u6d17\u3001\u5206\u6790\u548c\u53ef\u89c6\u5316\u3002\u5e38\u7528\u7684\u6b65\u9aa4\u5305\u62ec\u8bfb\u53d6CSV\u6587\u4ef6\u3001\u5904\u7406\u7f3a\u5931\u503c\u3001\u8ba1\u7b97\u5404\u9879\u4f59\u989d\uff0c\u5e76\u4f7f\u7528Matplotlib\u6216Seaborn\u8fdb\u884c\u56fe\u8868\u5c55\u793a\u3002<\/p>\n<p><strong>\u4f7f\u7528Python\u521b\u5efa\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\u7684\u5173\u952e\u6b65\u9aa4\u6709\u54ea\u4e9b\uff1f<\/strong><br \/>\u5728\u521b\u5efa\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\u65f6\uff0c\u53ef\u4ee5\u9075\u5faa\u4ee5\u4e0b\u5173\u952e\u6b65\u9aa4\uff1a\u6536\u96c6\u6570\u636e\u6e90\uff08\u4f8b\u5982\u56fd\u9645\u8d27\u5e01\u57fa\u91d1\u7ec4\u7ec7\u3001\u4e16\u754c\u94f6\u884c\u7b49\uff09\uff0c\u4f7f\u7528Pandas\u8bfb\u53d6\u548c\u6574\u7406\u6570\u636e\uff0c\u8fdb\u884c\u5404\u9879\u6307\u6807\u7684\u8ba1\u7b97\uff08\u5982\u7ecf\u5e38\u8d26\u6237\u3001\u8d44\u672c\u8d26\u6237\uff09\uff0c\u5e76\u5c06\u7ed3\u679c\u8f93\u51fa\u4e3a\u56fe\u8868\u6216\u62a5\u544a\uff0c\u4ee5\u4fbf\u8fdb\u884c\u5206\u6790\u548c\u51b3\u7b56\u3002<\/p>\n<p><strong>\u6709\u54ea\u4e9bPython\u5e93\u9002\u5408\u5206\u6790\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\uff1f<\/strong><br \/>\u5206\u6790\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u4e2aPython\u5e93\u3002Pandas\u5e93\u975e\u5e38\u9002\u5408\u6570\u636e\u64cd\u4f5c\u548c\u5206\u6790\uff0cNumPy\u7528\u4e8e\u6570\u503c\u8ba1\u7b97\uff0cMatplotlib\u548cSeaborn\u53ef\u4ee5\u5e2e\u52a9\u60a8\u8fdb\u884c\u6570\u636e\u53ef\u89c6\u5316\u3002\u6b64\u5916\uff0cStatsmodels\u5e93\u4e5f\u53ef\u4ee5\u7528\u4e8e\u7edf\u8ba1\u5206\u6790\u548c\u7ecf\u6d4e\u6a21\u578b\u5efa\u7acb\uff0c\u5e2e\u52a9\u6df1\u5165\u7406\u89e3\u56fd\u9645\u6536\u652f\u7684\u52a8\u6001\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\u5982\u4f55\u7528Python \u56fd\u9645\u6536\u652f\u5e73\u8861\u8868\u662f\u4e00\u4e2a\u56fd\u5bb6\u7ecf\u6d4e\u6d3b\u52a8\u7684\u7efc\u5408\u8bb0\u5f55\uff0c\u5305\u62ec\u5546\u54c1\u3001\u670d\u52a1\u3001\u6536\u5165\u548c\u8d44\u672c\u7684\u8fdb\u51fa [&hellip;]","protected":false},"author":3,"featured_media":1127493,"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\/1127489"}],"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=1127489"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1127489\/revisions"}],"predecessor-version":[{"id":1127495,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1127489\/revisions\/1127495"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1127493"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1127489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1127489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1127489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}