{"id":1048258,"date":"2024-12-31T13:49:30","date_gmt":"2024-12-31T05:49:30","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1048258.html"},"modified":"2024-12-31T13:49:32","modified_gmt":"2024-12-31T05:49:32","slug":"%e5%a6%82%e4%bd%95%e5%88%a9%e7%94%a8python%e8%bf%9b%e8%a1%8c%e6%95%b0%e6%8d%ae%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1048258.html","title":{"rendered":"\u5982\u4f55\u5229\u7528python\u8fdb\u884c\u6570\u636e\u5206\u6790"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/ad55b678-47ce-419d-989a-f5156c07ef45.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"\u5982\u4f55\u5229\u7528python\u8fdb\u884c\u6570\u636e\u5206\u6790\" \/><\/p>\n<p><p> <strong>\u5982\u4f55\u5229\u7528Python\u8fdb\u884c\u6570\u636e\u5206\u6790<\/strong><\/p>\n<\/p>\n<p><p>\u5229\u7528Python\u8fdb\u884c\u6570\u636e\u5206\u6790\u7684\u6838\u5fc3\u89c2\u70b9\u5305\u62ec\uff1a<strong>\u9009\u62e9\u5408\u9002\u7684\u5e93\u3001\u6570\u636e\u6e05\u6d17\u4e0e\u9884\u5904\u7406\u3001\u6570\u636e\u53ef\u89c6\u5316\u3001<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u6a21\u578b\u7684\u5e94\u7528<\/strong>\u3002\u5176\u4e2d\uff0c\u9009\u62e9\u5408\u9002\u7684\u5e93\u662f\u6570\u636e\u5206\u6790\u7684\u5173\u952e\u6b65\u9aa4\uff0c\u56e0\u4e3a\u4e0d\u540c\u7684\u5e93\u6709\u4e0d\u540c\u7684\u529f\u80fd\u548c\u4f18\u52bf\u3002Python\u6709\u4e30\u5bcc\u7684\u5e93\u53ef\u4ee5\u7528\u6765\u8fdb\u884c\u6570\u636e\u5206\u6790\uff0c\u5982Pandas\u3001NumPy\u3001Matplotlib\u3001Seaborn\u3001Scikit-learn\u7b49\u3002\u9009\u62e9\u5408\u9002\u7684\u5e93\u80fd\u591f\u5927\u5927\u63d0\u9ad8\u6570\u636e\u5206\u6790\u7684\u6548\u7387\u548c\u6548\u679c\u3002<\/p>\n<\/p>\n<p><p>\u5728\u8fdb\u884c\u6570\u636e\u5206\u6790\u65f6\uff0c\u9009\u62e9\u5408\u9002\u7684\u5e93\u80fd\u591f\u5e2e\u52a9\u4f60\u5feb\u901f\u5b9e\u73b0\u6570\u636e\u7684\u8bfb\u53d6\u3001\u5904\u7406\u3001\u5206\u6790\u548c\u53ef\u89c6\u5316\u3002\u4f8b\u5982\uff0cPandas\u5e93\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u6570\u636e\u64cd\u4f5c\u529f\u80fd\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fdb\u884c\u6570\u636e\u6e05\u6d17\u548c\u5904\u7406\uff1bNumPy\u5e93\u7528\u4e8e\u9ad8\u6548\u7684\u6570\u503c\u8ba1\u7b97\uff1bMatplotlib\u548cSeaborn\u53ef\u4ee5\u751f\u6210\u5404\u79cd\u6f02\u4eae\u7684\u56fe\u8868\u7528\u4e8e\u6570\u636e\u53ef\u89c6\u5316\uff1bScikit-learn\u5219\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u673a\u5668\u5b66\u4e60\u5e93\uff0c\u63d0\u4f9b\u4e86\u5404\u79cd\u5e38\u7528\u7684\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\u3002\u901a\u8fc7\u5408\u7406\u9009\u62e9\u548c\u7ec4\u5408\u8fd9\u4e9b\u5e93\uff0c\u4f60\u53ef\u4ee5\u9ad8\u6548\u5730\u5b8c\u6210\u6570\u636e\u5206\u6790\u4efb\u52a1\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u9009\u62e9\u5408\u9002\u7684\u5e93<\/h3>\n<\/p>\n<p><p>\u5728\u6570\u636e\u5206\u6790\u7684\u8fc7\u7a0b\u4e2d\uff0c\u9009\u62e9\u5408\u9002\u7684\u5e93\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002Python\u6709\u5f88\u591a\u5f3a\u5927\u7684\u5e93\u53ef\u4ee5\u7528\u6765\u8fdb\u884c\u6570\u636e\u5206\u6790\uff0c\u4e0b\u9762\u4ecb\u7ecd\u51e0\u4e2a\u5e38\u7528\u7684\u5e93\u3002<\/p>\n<\/p>\n<p><h4>1\u3001Pandas<\/h4>\n<\/p>\n<p><p>Pandas\u662f\u4e00\u4e2a\u7528\u4e8e\u6570\u636e\u64cd\u4f5c\u548c\u5206\u6790\u7684\u5e93\u3002\u5b83\u63d0\u4f9b\u4e86\u9ad8\u6548\u7684\u6570\u636e\u7ed3\u6784\u548c\u6570\u636e\u5206\u6790\u5de5\u5177\uff0c\u5c24\u5176\u9002\u5408\u5904\u7406\u8868\u683c\u6570\u636e\u3002Pandas\u7684\u4e3b\u8981\u6570\u636e\u7ed3\u6784\u662fDataFrame\uff0c\u5b83\u7c7b\u4f3c\u4e8eExcel\u4e2d\u7684\u8868\u683c\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fdb\u884c\u6570\u636e\u7684\u8bfb\u53d6\u3001\u6e05\u6d17\u3001\u5904\u7406\u548c\u5206\u6790\u3002<\/p>\n<\/p>\n<p><p>\u4f7f\u7528Pandas\u53ef\u4ee5\u65b9\u4fbf\u5730\u8bfb\u53d6\u4e0d\u540c\u683c\u5f0f\u7684\u6570\u636e\u6587\u4ef6\uff0c\u5982CSV\u3001Excel\u3001SQL\u6570\u636e\u5e93\u7b49\u3002\u8bfb\u53d6\u6570\u636e\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528Pandas\u63d0\u4f9b\u7684\u5404\u79cd\u65b9\u6cd5\u5bf9\u6570\u636e\u8fdb\u884c\u64cd\u4f5c\uff0c\u5982\u8fc7\u6ee4\u3001\u5206\u7ec4\u3001\u805a\u5408\u3001\u5408\u5e76\u7b49\u3002\u6b64\u5916\uff0cPandas\u8fd8\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u6570\u636e\u6e05\u6d17\u548c\u5904\u7406\u5de5\u5177\uff0c\u5982\u7f3a\u5931\u503c\u5904\u7406\u3001\u91cd\u590d\u503c\u5904\u7406\u3001\u6570\u636e\u8f6c\u6362\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u793a\u4f8b\u4ee3\u7801\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>df = pd.read_csv(&#39;data.csv&#39;)<\/p>\n<h2><strong>\u67e5\u770b\u6570\u636e\u57fa\u672c\u4fe1\u606f<\/strong><\/h2>\n<p>print(df.head())<\/p>\n<p>print(df.info())<\/p>\n<h2><strong>\u6570\u636e\u6e05\u6d17\u548c\u5904\u7406<\/strong><\/h2>\n<p>df.dropna(inplace=True)  # \u5220\u9664\u7f3a\u5931\u503c<\/p>\n<p>df[&#39;column&#39;] = df[&#39;column&#39;].astype(int)  # \u6570\u636e\u7c7b\u578b\u8f6c\u6362<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001NumPy<\/h4>\n<\/p>\n<p><p>NumPy\u662f\u4e00\u4e2a\u7528\u4e8e\u79d1\u5b66\u8ba1\u7b97\u7684\u5e93\uff0c\u63d0\u4f9b\u4e86\u9ad8\u6548\u7684\u591a\u7ef4\u6570\u7ec4\u5bf9\u8c61\u548c\u7528\u4e8e\u6570\u7ec4\u64cd\u4f5c\u7684\u51fd\u6570\u3002NumPy\u7684\u6838\u5fc3\u662fndarray\u5bf9\u8c61\uff0c\u5b83\u662f\u4e00\u4e2a\u591a\u7ef4\u6570\u7ec4\uff0c\u53ef\u4ee5\u5b58\u50a8\u540c\u7c7b\u578b\u7684\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>NumPy\u7684\u6570\u7ec4\u64cd\u4f5c\u975e\u5e38\u9ad8\u6548\uff0c\u9002\u5408\u8fdb\u884c\u5927\u91cf\u7684\u6570\u503c\u8ba1\u7b97\u3002\u5e38\u7528\u7684NumPy\u64cd\u4f5c\u5305\u62ec\u6570\u7ec4\u521b\u5efa\u3001\u6570\u7ec4\u7d22\u5f15\u548c\u5207\u7247\u3001\u6570\u7ec4\u8fd0\u7b97\u3001\u6570\u7ec4\u7edf\u8ba1\u7b49\u3002NumPy\u8fd8\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u6570\u5b66\u51fd\u6570\u548c\u7ebf\u6027\u4ee3\u6570\u5de5\u5177\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fdb\u884c\u590d\u6742\u7684\u6570\u503c\u8ba1\u7b97\u3002<\/p>\n<\/p>\n<p><p>\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u521b\u5efa\u6570\u7ec4<\/strong><\/h2>\n<p>arr = np.array([1, 2, 3, 4, 5])<\/p>\n<h2><strong>\u6570\u7ec4\u8fd0\u7b97<\/strong><\/h2>\n<p>arr = arr * 2<\/p>\n<h2><strong>\u6570\u7ec4\u7edf\u8ba1<\/strong><\/h2>\n<p>mean = np.mean(arr)<\/p>\n<p>std = np.std(arr)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001Matplotlib\u548cSeaborn<\/h4>\n<\/p>\n<p><p>Matplotlib\u662f\u4e00\u4e2a\u7528\u4e8e\u6570\u636e\u53ef\u89c6\u5316\u7684\u5e93\uff0c\u53ef\u4ee5\u751f\u6210\u5404\u79cd\u9759\u6001\u3001\u52a8\u6001\u548c\u4ea4\u4e92\u5f0f\u56fe\u8868\u3002Matplotlib\u7684\u6838\u5fc3\u662fpyplot\u6a21\u5757\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u7ec4\u7c7b\u4f3c\u4e8eMATLAB\u7684\u7ed8\u56fe\u51fd\u6570\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u751f\u6210\u6298\u7ebf\u56fe\u3001\u67f1\u72b6\u56fe\u3001\u6563\u70b9\u56fe\u3001\u997c\u56fe\u7b49\u3002<\/p>\n<\/p>\n<p><p>Seaborn\u662f\u57fa\u4e8eMatplotlib\u7684\u9ad8\u7ea7\u6570\u636e\u53ef\u89c6\u5316\u5e93\uff0c\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7ea7\u7684\u63a5\u53e3\u548c\u66f4\u6f02\u4eae\u7684\u56fe\u8868\u6837\u5f0f\u3002Seaborn\u7279\u522b\u9002\u5408\u7528\u6765\u7ed8\u5236\u7edf\u8ba1\u56fe\u8868\uff0c\u5982\u7bb1\u7ebf\u56fe\u3001\u70ed\u529b\u56fe\u3001\u5206\u5e03\u56fe\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<p>import seaborn as sns<\/p>\n<h2><strong>\u751f\u6210\u6570\u636e<\/strong><\/h2>\n<p>x = [1, 2, 3, 4, 5]<\/p>\n<p>y = [2, 3, 4, 5, 6]<\/p>\n<h2><strong>\u4f7f\u7528Matplotlib\u7ed8\u56fe<\/strong><\/h2>\n<p>plt.plot(x, y)<\/p>\n<p>plt.xlabel(&#39;X-axis&#39;)<\/p>\n<p>plt.ylabel(&#39;Y-axis&#39;)<\/p>\n<p>plt.title(&#39;Line Plot&#39;)<\/p>\n<p>plt.show()<\/p>\n<h2><strong>\u4f7f\u7528Seaborn\u7ed8\u56fe<\/strong><\/h2>\n<p>sns.scatterplot(x=x, y=y)<\/p>\n<p>plt.xlabel(&#39;X-axis&#39;)<\/p>\n<p>plt.ylabel(&#39;Y-axis&#39;)<\/p>\n<p>plt.title(&#39;Scatter Plot&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>4\u3001Scikit-learn<\/h4>\n<\/p>\n<p><p>Scikit-learn\u662f\u4e00\u4e2a\u7528\u4e8e\u673a\u5668\u5b66\u4e60\u7684\u5e93\uff0c\u63d0\u4f9b\u4e86\u5404\u79cd\u5e38\u7528\u7684\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\u548c\u5de5\u5177\u3002Scikit-learn\u7684\u8bbe\u8ba1\u975e\u5e38\u7b80\u6d01\u548c\u6613\u7528\uff0c\u9002\u5408\u8fdb\u884c\u5feb\u901f\u7684\u6a21\u578b\u6784\u5efa\u548c\u8bc4\u4f30\u3002<\/p>\n<\/p>\n<p><p>Scikit-learn\u5305\u542b\u4e86\u5206\u7c7b\u3001\u56de\u5f52\u3001\u805a\u7c7b\u3001\u964d\u7ef4\u7b49\u591a\u79cd\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\uff0c\u4ee5\u53ca\u6570\u636e\u9884\u5904\u7406\u3001\u7279\u5f81\u9009\u62e9\u3001\u6a21\u578b\u9009\u62e9\u3001\u6a21\u578b\u8bc4\u4f30\u7b49\u5de5\u5177\u3002\u901a\u8fc7Scikit-learn\uff0c\u4f60\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fdb\u884c\u6570\u636e\u7684\u9884\u5904\u7406\u3001\u6a21\u578b\u7684\u8bad\u7ec3\u548c\u8bc4\u4f30\uff0c\u4ee5\u53ca\u7ed3\u679c\u7684\u89e3\u91ca\u548c\u5c55\u793a\u3002<\/p>\n<\/p>\n<p><p>\u793a\u4f8b\u4ee3\u7801\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.linear_model import LinearRegression<\/p>\n<p>from sklearn.metrics import mean_squared_error<\/p>\n<h2><strong>\u751f\u6210\u6570\u636e<\/strong><\/h2>\n<p>X = np.array([[1], [2], [3], [4], [5]])<\/p>\n<p>y = np.array([2, 3, 4, 5, 6])<\/p>\n<h2><strong>\u5212\u5206\u8bad\u7ec3\u96c6\u548c\u6d4b\u8bd5\u96c6<\/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>\u8bad\u7ec3\u6a21\u578b<\/strong><\/h2>\n<p>model = LinearRegression()<\/p>\n<p>model.fit(X_train, y_train)<\/p>\n<h2><strong>\u9884\u6d4b<\/strong><\/h2>\n<p>y_pred = model.predict(X_test)<\/p>\n<h2><strong>\u8bc4\u4f30\u6a21\u578b<\/strong><\/h2>\n<p>mse = mean_squared_error(y_test, y_pred)<\/p>\n<p>print(f&#39;Mean Squared Error: {mse}&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u6570\u636e\u6e05\u6d17\u4e0e\u9884\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u5728\u8fdb\u884c\u6570\u636e\u5206\u6790\u4e4b\u524d\uff0c\u6570\u636e\u6e05\u6d17\u4e0e\u9884\u5904\u7406\u662f\u975e\u5e38\u91cd\u8981\u7684\u4e00\u6b65\u3002\u6570\u636e\u5f80\u5f80\u662f\u6742\u4e71\u65e0\u7ae0\u3001\u4e0d\u5b8c\u6574\u6216\u5305\u542b\u566a\u58f0\u7684\uff0c\u5fc5\u987b\u8fdb\u884c\u6e05\u6d17\u548c\u9884\u5904\u7406\u624d\u80fd\u8fdb\u884c\u540e\u7eed\u7684\u5206\u6790\u3002<\/p>\n<\/p>\n<p><h4>1\u3001\u5904\u7406\u7f3a\u5931\u503c<\/h4>\n<\/p>\n<p><p>\u7f3a\u5931\u503c\u662f\u6570\u636e\u4e2d\u5e38\u89c1\u7684\u95ee\u9898\uff0c\u5982\u679c\u4e0d\u5904\u7406\u7f3a\u5931\u503c\uff0c\u53ef\u80fd\u4f1a\u5f71\u54cd\u5206\u6790\u7ed3\u679c\u3002\u5904\u7406\u7f3a\u5931\u503c\u7684\u65b9\u6cd5\u6709\u5f88\u591a\uff0c\u5e38\u89c1\u7684\u65b9\u6cd5\u5305\u62ec\u5220\u9664\u542b\u6709\u7f3a\u5931\u503c\u7684\u884c\u6216\u5217\u3001\u7528\u7279\u5b9a\u503c\u586b\u5145\u7f3a\u5931\u503c\uff08\u5982\u5747\u503c\u3001\u4e2d\u4f4d\u6570\u3001\u4f17\u6570\u7b49\uff09\u3001\u63d2\u503c\u6cd5\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5220\u9664\u542b\u6709\u7f3a\u5931\u503c\u7684\u884c<\/p>\n<p>df.dropna(inplace=True)<\/p>\n<h2><strong>\u7528\u5747\u503c\u586b\u5145\u7f3a\u5931\u503c<\/strong><\/h2>\n<p>df.fillna(df.mean(), inplace=True)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u5904\u7406\u91cd\u590d\u503c<\/h4>\n<\/p>\n<p><p>\u91cd\u590d\u503c\u4e5f\u662f\u6570\u636e\u4e2d\u5e38\u89c1\u7684\u95ee\u9898\uff0c\u53ef\u80fd\u662f\u7531\u4e8e\u6570\u636e\u91c7\u96c6\u6216\u5f55\u5165\u9519\u8bef\u5bfc\u81f4\u7684\u3002\u5904\u7406\u91cd\u590d\u503c\u7684\u65b9\u6cd5\u901a\u5e38\u662f\u5220\u9664\u91cd\u590d\u7684\u884c\u6216\u5217\u3002<\/p>\n<\/p>\n<p><p>\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5220\u9664\u91cd\u590d\u7684\u884c<\/p>\n<p>df.drop_duplicates(inplace=True)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001\u6570\u636e\u7c7b\u578b\u8f6c\u6362<\/h4>\n<\/p>\n<p><p>\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u662f\u5c06\u6570\u636e\u4ece\u4e00\u79cd\u7c7b\u578b\u8f6c\u6362\u4e3a\u53e6\u4e00\u79cd\u7c7b\u578b\uff0c\u4ee5\u4fbf\u8fdb\u884c\u6b63\u786e\u7684\u5206\u6790\u548c\u5904\u7406\u3002\u5e38\u89c1\u7684\u6570\u636e\u7c7b\u578b\u5305\u62ec\u6574\u6570\u3001\u6d6e\u70b9\u6570\u3001\u5b57\u7b26\u4e32\u3001\u65e5\u671f\u65f6\u95f4\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u6570\u636e\u7c7b\u578b\u8f6c\u6362<\/p>\n<p>df[&#39;column&#39;] = df[&#39;column&#39;].astype(int)<\/p>\n<p>df[&#39;date&#39;] = pd.to_datetime(df[&#39;date&#39;])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>4\u3001\u6570\u636e\u6807\u51c6\u5316\u4e0e\u5f52\u4e00\u5316<\/h4>\n<\/p>\n<p><p>\u6570\u636e\u6807\u51c6\u5316\u4e0e\u5f52\u4e00\u5316\u662f\u5c06\u6570\u636e\u8f6c\u6362\u4e3a\u7279\u5b9a\u7684\u8303\u56f4\u6216\u5206\u5e03\uff0c\u4ee5\u4fbf\u8fdb\u884c\u6a21\u578b\u8bad\u7ec3\u548c\u6bd4\u8f83\u3002\u5e38\u89c1\u7684\u6570\u636e\u6807\u51c6\u5316\u65b9\u6cd5\u5305\u62ecZ-score\u6807\u51c6\u5316\u548cMin-Max\u5f52\u4e00\u5316\u3002<\/p>\n<\/p>\n<p><p>\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn.preprocessing import StandardScaler, MinMaxScaler<\/p>\n<h2><strong>Z-score\u6807\u51c6\u5316<\/strong><\/h2>\n<p>scaler = StandardScaler()<\/p>\n<p>df_scaled = scaler.fit_transform(df)<\/p>\n<h2><strong>Min-Max\u5f52\u4e00\u5316<\/strong><\/h2>\n<p>scaler = MinMaxScaler()<\/p>\n<p>df_normalized = scaler.fit_transform(df)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u6570\u636e\u53ef\u89c6\u5316<\/h3>\n<\/p>\n<p><p>\u6570\u636e\u53ef\u89c6\u5316\u662f\u6570\u636e\u5206\u6790\u7684\u91cd\u8981\u6b65\u9aa4\uff0c\u901a\u8fc7\u56fe\u8868\u7684\u65b9\u5f0f\u5c55\u793a\u6570\u636e\uff0c\u53ef\u4ee5\u66f4\u76f4\u89c2\u5730\u53d1\u73b0\u6570\u636e\u4e2d\u7684\u89c4\u5f8b\u548c\u8d8b\u52bf\u3002Python\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u6570\u636e\u53ef\u89c6\u5316\u5e93\uff0c\u5982Matplotlib\u3001Seaborn\u3001Plotly\u7b49\u3002<\/p>\n<\/p>\n<p><h4>1\u3001Matplotlib<\/h4>\n<\/p>\n<p><p>Matplotlib\u662f\u6700\u57fa\u672c\u7684\u6570\u636e\u53ef\u89c6\u5316\u5e93\uff0c\u53ef\u4ee5\u751f\u6210\u5404\u79cd\u9759\u6001\u3001\u52a8\u6001\u548c\u4ea4\u4e92\u5f0f\u56fe\u8868\u3002\u5e38\u7528\u7684\u56fe\u8868\u7c7b\u578b\u5305\u62ec\u6298\u7ebf\u56fe\u3001\u67f1\u72b6\u56fe\u3001\u6563\u70b9\u56fe\u3001\u997c\u56fe\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u6298\u7ebf\u56fe<\/strong><\/h2>\n<p>plt.plot(x, y)<\/p>\n<p>plt.xlabel(&#39;X-axis&#39;)<\/p>\n<p>plt.ylabel(&#39;Y-axis&#39;)<\/p>\n<p>plt.title(&#39;Line Plot&#39;)<\/p>\n<p>plt.show()<\/p>\n<h2><strong>\u67f1\u72b6\u56fe<\/strong><\/h2>\n<p>plt.bar(x, y)<\/p>\n<p>plt.xlabel(&#39;X-axis&#39;)<\/p>\n<p>plt.ylabel(&#39;Y-axis&#39;)<\/p>\n<p>plt.title(&#39;Bar Plot&#39;)<\/p>\n<p>plt.show()<\/p>\n<h2><strong>\u6563\u70b9\u56fe<\/strong><\/h2>\n<p>plt.scatter(x, y)<\/p>\n<p>plt.xlabel(&#39;X-axis&#39;)<\/p>\n<p>plt.ylabel(&#39;Y-axis&#39;)<\/p>\n<p>plt.title(&#39;Scatter Plot&#39;)<\/p>\n<p>plt.show()<\/p>\n<h2><strong>\u997c\u56fe<\/strong><\/h2>\n<p>plt.pie(y, labels=x, autopct=&#39;%1.1f%%&#39;)<\/p>\n<p>plt.title(&#39;Pie Chart&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001Seaborn<\/h4>\n<\/p>\n<p><p>Seaborn\u662f\u57fa\u4e8eMatplotlib\u7684\u9ad8\u7ea7\u6570\u636e\u53ef\u89c6\u5316\u5e93\uff0c\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7ea7\u7684\u63a5\u53e3\u548c\u66f4\u6f02\u4eae\u7684\u56fe\u8868\u6837\u5f0f\u3002\u5e38\u7528\u7684\u56fe\u8868\u7c7b\u578b\u5305\u62ec\u7bb1\u7ebf\u56fe\u3001\u70ed\u529b\u56fe\u3001\u5206\u5e03\u56fe\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import seaborn as sns<\/p>\n<h2><strong>\u7bb1\u7ebf\u56fe<\/strong><\/h2>\n<p>sns.boxplot(x=x, y=y)<\/p>\n<p>plt.xlabel(&#39;X-axis&#39;)<\/p>\n<p>plt.ylabel(&#39;Y-axis&#39;)<\/p>\n<p>plt.title(&#39;Box Plot&#39;)<\/p>\n<p>plt.show()<\/p>\n<h2><strong>\u70ed\u529b\u56fe<\/strong><\/h2>\n<p>sns.heatmap(data=df.corr(), annot=True)<\/p>\n<p>plt.title(&#39;Heatmap&#39;)<\/p>\n<p>plt.show()<\/p>\n<h2><strong>\u5206\u5e03\u56fe<\/strong><\/h2>\n<p>sns.distplot(y)<\/p>\n<p>plt.xlabel(&#39;Y-axis&#39;)<\/p>\n<p>plt.title(&#39;Distribution Plot&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3\u3001Plotly<\/h4>\n<\/p>\n<p><p>Plotly\u662f\u4e00\u4e2a\u7528\u4e8e\u751f\u6210\u4ea4\u4e92\u5f0f\u56fe\u8868\u7684\u5e93\uff0c\u9002\u5408\u7528\u6765\u751f\u6210\u7f51\u9875\u4e0a\u7684\u4ea4\u4e92\u5f0f\u56fe\u8868\u3002Plotly\u652f\u6301\u7684\u56fe\u8868\u7c7b\u578b\u975e\u5e38\u4e30\u5bcc\uff0c\u5305\u62ec\u6298\u7ebf\u56fe\u3001\u67f1\u72b6\u56fe\u3001\u6563\u70b9\u56fe\u3001\u997c\u56fe\u3001\u5730\u56fe\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import plotly.express as px<\/p>\n<h2><strong>\u6298\u7ebf\u56fe<\/strong><\/h2>\n<p>fig = px.line(x=x, y=y, labels={&#39;x&#39;: &#39;X-axis&#39;, &#39;y&#39;: &#39;Y-axis&#39;}, title=&#39;Line Plot&#39;)<\/p>\n<p>fig.show()<\/p>\n<h2><strong>\u67f1\u72b6\u56fe<\/strong><\/h2>\n<p>fig = px.bar(x=x, y=y, labels={&#39;x&#39;: &#39;X-axis&#39;, &#39;y&#39;: &#39;Y-axis&#39;}, title=&#39;Bar Plot&#39;)<\/p>\n<p>fig.show()<\/p>\n<h2><strong>\u6563\u70b9\u56fe<\/strong><\/h2>\n<p>fig = px.scatter(x=x, y=y, labels={&#39;x&#39;: &#39;X-axis&#39;, &#39;y&#39;: &#39;Y-axis&#39;}, title=&#39;Scatter Plot&#39;)<\/p>\n<p>fig.show()<\/p>\n<h2><strong>\u997c\u56fe<\/strong><\/h2>\n<p>fig = px.pie(values=y, names=x, title=&#39;Pie Chart&#39;)<\/p>\n<p>fig.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u673a\u5668\u5b66\u4e60\u6a21\u578b\u7684\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u673a\u5668\u5b66\u4e60\u6a21\u578b\u7684\u5e94\u7528\u662f\u6570\u636e\u5206\u6790\u7684\u9ad8\u7ea7\u9636\u6bb5\uff0c\u901a\u8fc7\u6784\u5efa\u548c\u8bad\u7ec3\u673a\u5668\u5b66\u4e60\u6a21\u578b\uff0c\u53ef\u4ee5\u4ece\u6570\u636e\u4e2d\u53d1\u73b0\u66f4\u6df1\u5c42\u6b21\u7684\u89c4\u5f8b\u548c\u6a21\u5f0f\u3002Python\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u673a\u5668\u5b66\u4e60\u5e93\uff0c\u5982Scikit-learn\u3001TensorFlow\u3001Keras\u7b49\u3002<\/p>\n<\/p>\n<p><h4>1\u3001Scikit-learn<\/h4>\n<\/p>\n<p><p>Scikit-learn\u662f\u4e00\u4e2a\u7528\u4e8e\u673a\u5668\u5b66\u4e60\u7684\u5e93\uff0c\u63d0\u4f9b\u4e86\u5404\u79cd\u5e38\u7528\u7684\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\u548c\u5de5\u5177\u3002\u5e38\u7528\u7684\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\u5305\u62ec\u7ebf\u6027\u56de\u5f52\u3001\u903b\u8f91\u56de\u5f52\u3001\u51b3\u7b56\u6811\u3001\u968f\u673a\u68ee\u6797\u3001\u652f\u6301\u5411\u91cf\u673a\u3001K\u8fd1\u90bb\u3001\u805a\u7c7b\u7b97\u6cd5\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn.model_selection import train_test_split<\/p>\n<p>from sklearn.linear_model import LinearRegression<\/p>\n<p>from sklearn.metrics import mean_squared_error<\/p>\n<h2><strong>\u751f\u6210\u6570\u636e<\/strong><\/h2>\n<p>X = np.array([[1], [2], [3], [4], [5]])<\/p>\n<p>y = np.array([2, 3, 4, 5, 6])<\/p>\n<h2><strong>\u5212\u5206\u8bad\u7ec3\u96c6\u548c\u6d4b\u8bd5\u96c6<\/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>\u8bad\u7ec3\u6a21\u578b<\/strong><\/h2>\n<p>model = LinearRegression()<\/p>\n<p>model.fit(X_train, y_train)<\/p>\n<h2><strong>\u9884\u6d4b<\/strong><\/h2>\n<p>y_pred = model.predict(X_test)<\/p>\n<h2><strong>\u8bc4\u4f30\u6a21\u578b<\/strong><\/h2>\n<p>mse = mean_squared_error(y_test, y_pred)<\/p>\n<p>print(f&#39;Mean Squared Error: {mse}&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001TensorFlow\u548cKeras<\/h4>\n<\/p>\n<p><p>TensorFlow\u548cKeras\u662f\u7528\u4e8e\u6df1\u5ea6\u5b66\u4e60\u7684\u5e93\uff0c\u53ef\u4ee5\u6784\u5efa\u548c\u8bad\u7ec3\u6df1\u5ea6\u795e\u7ecf\u7f51\u7edc\u6a21\u578b\u3002TensorFlow\u662f\u4e00\u4e2a\u4f4e\u7ea7\u7684\u6df1\u5ea6\u5b66\u4e60\u5e93\uff0c\u63d0\u4f9b\u4e86\u7075\u6d3b\u7684\u6a21\u578b\u6784\u5efa\u548c\u8bad\u7ec3\u63a5\u53e3\uff1bKeras\u662f\u4e00\u4e2a\u9ad8\u7ea7\u7684\u6df1\u5ea6\u5b66\u4e60\u5e93\uff0c\u57fa\u4e8eTensorFlow\uff0c\u63d0\u4f9b\u4e86\u7b80\u6d01\u6613\u7528\u7684\u6a21\u578b\u6784\u5efa\u548c\u8bad\u7ec3\u63a5\u53e3\u3002<\/p>\n<\/p>\n<p><p>\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import tensorflow as tf<\/p>\n<p>from tensorflow.keras.models import Sequential<\/p>\n<p>from tensorflow.keras.layers import Dense<\/p>\n<h2><strong>\u751f\u6210\u6570\u636e<\/strong><\/h2>\n<p>X = np.array([[1], [2], [3], [4], [5]])<\/p>\n<p>y = np.array([2, 3, 4, 5, 6])<\/p>\n<h2><strong>\u6784\u5efa\u6a21\u578b<\/strong><\/h2>\n<p>model = Sequential()<\/p>\n<p>model.add(Dense(1, input_dim=1, activation=&#39;linear&#39;))<\/p>\n<h2><strong>\u7f16\u8bd1\u6a21\u578b<\/strong><\/h2>\n<p>model.compile(optimizer=&#39;adam&#39;, loss=&#39;mean_squared_error&#39;)<\/p>\n<h2><strong>\u8bad\u7ec3\u6a21\u578b<\/strong><\/h2>\n<p>model.fit(X, y, epochs=100, verbose=0)<\/p>\n<h2><strong>\u9884\u6d4b<\/strong><\/h2>\n<p>y_pred = model.predict(X)<\/p>\n<h2><strong>\u6253\u5370\u9884\u6d4b\u7ed3\u679c<\/strong><\/h2>\n<p>print(y_pred)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5229\u7528Python\u8fdb\u884c\u6570\u636e\u5206\u6790\u53ef\u4ee5\u5927\u5927\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u548c\u5206\u6790\u6548\u679c\u3002\u901a\u8fc7\u9009\u62e9\u5408\u9002\u7684\u5e93\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fdb\u884c\u6570\u636e\u7684\u8bfb\u53d6\u3001\u6e05\u6d17\u3001\u5904\u7406\u3001\u5206\u6790\u548c\u53ef\u89c6\u5316\u3002\u6570\u636e\u6e05\u6d17\u4e0e\u9884\u5904\u7406\u662f\u6570\u636e\u5206\u6790\u7684\u91cd\u8981\u6b65\u9aa4\uff0c\u901a\u8fc7\u5904\u7406\u7f3a\u5931\u503c\u3001\u91cd\u590d\u503c\u3001\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u548c\u6570\u636e\u6807\u51c6\u5316\uff0c\u53ef\u4ee5\u786e\u4fdd\u6570\u636e\u7684\u8d28\u91cf\u548c\u4e00\u81f4\u6027\u3002\u6570\u636e\u53ef\u89c6\u5316\u662f\u6570\u636e\u5206\u6790\u7684\u91cd\u8981\u624b\u6bb5\uff0c\u901a\u8fc7\u751f\u6210\u5404\u79cd\u56fe\u8868\uff0c\u53ef\u4ee5\u76f4\u89c2\u5730\u5c55\u793a\u6570\u636e\u4e2d\u7684\u89c4\u5f8b\u548c\u8d8b\u52bf\u3002\u673a\u5668\u5b66\u4e60\u6a21\u578b\u7684\u5e94\u7528\u662f\u6570\u636e\u5206\u6790\u7684\u9ad8\u7ea7\u9636\u6bb5\uff0c\u901a\u8fc7\u6784\u5efa\u548c\u8bad\u7ec3\u673a\u5668\u5b66\u4e60\u6a21\u578b\uff0c\u53ef\u4ee5\u4ece\u6570\u636e\u4e2d\u53d1\u73b0\u66f4\u6df1\u5c42\u6b21\u7684\u89c4\u5f8b\u548c\u6a21\u5f0f\u3002\u901a\u8fc7\u5408\u7406\u9009\u62e9\u548c\u7ec4\u5408\u8fd9\u4e9b\u5de5\u5177\u548c\u65b9\u6cd5\uff0c\u53ef\u4ee5\u9ad8\u6548\u5730\u5b8c\u6210\u6570\u636e\u5206\u6790\u4efb\u52a1\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5f00\u59cb\u4f7f\u7528Python\u8fdb\u884c\u6570\u636e\u5206\u6790\uff1f<\/strong><br \/>\u8981\u5f00\u59cb\u4f7f\u7528Python\u8fdb\u884c\u6570\u636e\u5206\u6790\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5Python\u53ca\u5176\u76f8\u5173\u5e93\uff0c\u5982Pandas\u3001NumPy\u3001Matplotlib\u548cSeaborn\u3002\u8fd9\u4e9b\u5e93\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u6570\u636e\u5904\u7406\u548c\u53ef\u89c6\u5316\u529f\u80fd\u3002\u53ef\u4ee5\u901a\u8fc7Anaconda\u6216\u76f4\u63a5\u4f7f\u7528pip\u5b89\u88c5\u8fd9\u4e9b\u5e93\u3002\u63a5\u4e0b\u6765\uff0c\u5b66\u4e60Python\u7684\u57fa\u7840\u77e5\u8bc6\uff0c\u5c24\u5176\u662f\u6570\u636e\u7ed3\u6784\u548c\u63a7\u5236\u6d41\uff0c\u80fd\u591f\u5e2e\u52a9\u60a8\u66f4\u597d\u5730\u7406\u89e3\u6570\u636e\u5206\u6790\u7684\u8fc7\u7a0b\u3002<\/p>\n<p><strong>Python\u4e2d\u6709\u54ea\u4e9b\u5e38\u7528\u7684\u6570\u636e\u5206\u6790\u5e93\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u5e38\u7528\u7684\u6570\u636e\u5206\u6790\u5e93\u5305\u62ec\uff1a  <\/p>\n<ul>\n<li><strong>Pandas<\/strong>\uff1a\u7528\u4e8e\u6570\u636e\u64cd\u4f5c\u548c\u5206\u6790\uff0c\u63d0\u4f9b\u4e86\u6570\u636e\u6846\uff08DataFrame\uff09\u7ed3\u6784\uff0c\u65b9\u4fbf\u8fdb\u884c\u6570\u636e\u6e05\u6d17\u548c\u5904\u7406\u3002  <\/li>\n<li><strong>NumPy<\/strong>\uff1a\u7528\u4e8e\u9ad8\u6027\u80fd\u7684\u6570\u503c\u8ba1\u7b97\uff0c\u652f\u6301\u591a\u7ef4\u6570\u7ec4\u548c\u77e9\u9635\u64cd\u4f5c\u3002  <\/li>\n<li><strong>Matplotlib<\/strong>\u548c<strong>Seaborn<\/strong>\uff1a\u7528\u4e8e\u6570\u636e\u53ef\u89c6\u5316\uff0c\u53ef\u4ee5\u521b\u5efa\u5404\u79cd\u7c7b\u578b\u7684\u56fe\u8868\uff0c\u5e2e\u52a9\u5206\u6790\u6570\u636e\u8d8b\u52bf\u548c\u6a21\u5f0f\u3002  <\/li>\n<li><strong>Scikit-learn<\/strong>\uff1a\u7528\u4e8e\u673a\u5668\u5b66\u4e60\u548c\u6570\u636e\u6316\u6398\uff0c\u5305\u542b\u591a\u79cd\u7b97\u6cd5\u548c\u5de5\u5177\u3002<\/li>\n<\/ul>\n<p><strong>\u5728\u6570\u636e\u5206\u6790\u8fc7\u7a0b\u4e2d\uff0c\u5982\u4f55\u5904\u7406\u7f3a\u5931\u503c\uff1f<\/strong><br \/>\u5904\u7406\u7f3a\u5931\u503c\u662f\u6570\u636e\u5206\u6790\u4e2d\u4e00\u4e2a\u91cd\u8981\u7684\u6b65\u9aa4\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u79cd\u65b9\u5f0f\u6765\u5904\u7406\u7f3a\u5931\u503c\uff1a  <\/p>\n<ul>\n<li><strong>\u5220\u9664\u7f3a\u5931\u503c<\/strong>\uff1a\u82e5\u7f3a\u5931\u503c\u5360\u6bd4\u5c0f\uff0c\u53ef\u4ee5\u76f4\u63a5\u5220\u9664\u5305\u542b\u7f3a\u5931\u503c\u7684\u884c\u6216\u5217\u3002  <\/li>\n<li><strong>\u586b\u8865\u7f3a\u5931\u503c<\/strong>\uff1a\u53ef\u4ee5\u4f7f\u7528\u5747\u503c\u3001\u4e2d\u4f4d\u6570\u6216\u4f17\u6570\u586b\u8865\u7f3a\u5931\u503c\uff0c\u6216\u4f7f\u7528\u63d2\u503c\u6cd5\u548c\u524d\u5411\/\u540e\u5411\u586b\u5145\u7b49\u65b9\u6cd5\u3002  <\/li>\n<li><strong>\u4fdd\u7559\u7f3a\u5931\u503c<\/strong>\uff1a\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u7f3a\u5931\u503c\u672c\u8eab\u53ef\u80fd\u662f\u6709\u610f\u4e49\u7684\uff0c\u56e0\u6b64\u53ef\u4ee5\u9009\u62e9\u4fdd\u7559\uff0c\u5e76\u5728\u5206\u6790\u4e2d\u8fdb\u884c\u76f8\u5e94\u7684\u6807\u8bb0\u3002<br \/>\u9009\u62e9\u5904\u7406\u65b9\u5f0f\u65f6\uff0c\u9700\u8981\u6839\u636e\u5177\u4f53\u6570\u636e\u548c\u5206\u6790\u76ee\u6807\u6765\u51b3\u5b9a\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"\u5982\u4f55\u5229\u7528Python\u8fdb\u884c\u6570\u636e\u5206\u6790 \u5229\u7528Python\u8fdb\u884c\u6570\u636e\u5206\u6790\u7684\u6838\u5fc3\u89c2\u70b9\u5305\u62ec\uff1a\u9009\u62e9\u5408\u9002\u7684\u5e93\u3001\u6570\u636e\u6e05\u6d17\u4e0e\u9884\u5904\u7406\u3001 [&hellip;]","protected":false},"author":3,"featured_media":1048264,"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\/1048258"}],"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=1048258"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1048258\/revisions"}],"predecessor-version":[{"id":1048266,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1048258\/revisions\/1048266"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1048264"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1048258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1048258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1048258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}