{"id":883,"date":"2023-07-28T10:48:49","date_gmt":"2023-07-28T10:48:49","guid":{"rendered":"https:\/\/statorials.org\/cn\/%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92-python\/"},"modified":"2023-07-28T10:48:49","modified_gmt":"2023-07-28T10:48:49","slug":"%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92-python","status":"publish","type":"post","link":"https:\/\/statorials.org\/cn\/%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92-python\/","title":{"rendered":"Python \u7ebf\u6027\u56de\u5f52\u5b8c\u6574\u6307\u5357"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\"><strong>\u7ebf\u6027\u56de\u5f52<\/strong>\u662f\u4e00\u79cd\u6211\u4eec\u53ef\u4ee5\u7528\u6765\u7406\u89e3\u4e00\u4e2a\u6216\u591a\u4e2a\u9884\u6d4b\u53d8\u91cf\u4e0e\u54cd\u5e94\u53d8\u91cf\u4e4b\u95f4\u5173\u7cfb\u7684\u65b9\u6cd5\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7ebf\u6027\u56de\u5f52\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u793a\u4f8b\uff1aPython \u4e2d\u7684\u7ebf\u6027\u56de\u5f52<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u5047\u8bbe\u6211\u4eec\u60f3\u77e5\u9053\u5b66\u4e60\u7684\u5c0f\u65f6\u6570\u548c\u53c2\u52a0\u7ec3\u4e60\u8003\u8bd5\u7684\u6b21\u6570\u662f\u5426\u4f1a\u5f71\u54cd\u5b66\u751f\u5728\u7ed9\u5b9a\u8003\u8bd5\u4e2d\u83b7\u5f97\u7684\u6210\u7ee9\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4e3a\u4e86\u63a2\u7d22\u8fd9\u79cd\u5173\u7cfb\uff0c\u6211\u4eec\u53ef\u4ee5\u5728Python\u4e2d\u6267\u884c\u4ee5\u4e0b\u6b65\u9aa4\u6765\u6267\u884c\u591a\u5143\u7ebf\u6027\u56de\u5f52\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u7b2c 1 \u6b65\uff1a\u8f93\u5165\u6570\u636e\u3002<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u9996\u5148\uff0c\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a pandas DataFrame \u6765\u4fdd\u5b58\u6211\u4eec\u7684\u6570\u636e\u96c6\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">import<\/span> pandas <span style=\"color: #107d3f;\">as<\/span> pd\n\n<span style=\"color: #008080;\">#create data<\/span>\ndf = pd.DataFrame({'hours': [1, 2, 2, 4, 2, 1, 5, 4, 2, 4, 4, 3, 6, 5, 3, 4, 6, 2, 1, 2],\n                   'exams': [1, 3, 3, 5, 2, 2, 1, 1, 0, 3, 4, 3, 2, 4, 4, 4, 5, 1, 0, 1],\n                   'score': [76, 78, 85, 88, 72, 69, 94, 94, 88, 92, 90, 75, 96, 90, 82, 85, 99, 83, 62, 76]})\n<span style=\"color: #008080;\">\n#view data<\/span> \ndf\n\n        hours exam score\n0 1 1 76\n1 2 3 78\n2 2 3 85\n3 4 5 88\n4 2 2 72\n5 1 2 69\n6 5 1 94\n7 4 1 94\n8 2 0 88\n9 4 3 92\n10 4 4 90\n11 3 3 75\n12 6 2 96\n13 5 4 90\n14 3 4 82\n15 4 4 85\n16 6 5 99\n17 2 1 83\n18 1 0 62\n19 2 1 76\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\"><strong>\u6b65\u9aa4 2\uff1a\u6267\u884c\u7ebf\u6027\u56de\u5f52\u3002<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u4f7f\u7528 statsmodels \u5e93\u4e2d\u7684<a href=\"https:\/\/www.statsmodels.org\/devel\/generated\/statsmodels.regression.linear_model.OLS.html\" target=\"_blank\" rel=\"noopener noreferrer\">OLS() \u51fd\u6570<\/a>\u6267\u884c\u666e\u901a\u6700\u5c0f\u4e8c\u4e58\u56de\u5f52\uff0c\u4f7f\u7528\u201c\u5c0f\u65f6\u201d\u548c\u201c\u8003\u8bd5\u201d\u4f5c\u4e3a\u9884\u6d4b\u53d8\u91cf\uff0c\u201c\u5206\u6570\u201d\u4f5c\u4e3a\u54cd\u5e94\u53d8\u91cf\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">import<\/span> statsmodels.api <span style=\"color: #107d3f;\">as<\/span> sm\n\n<span style=\"color: #008080;\">#define response variable\n<\/span>y = df['score']\n\n<span style=\"color: #008080;\">#define predictor variables\n<\/span>x = df[['hours', 'exams']]\n\n<span style=\"color: #008080;\">#add constant to predictor variables\n<\/span>x = sm.add_constant(x)\n\n<span style=\"color: #008080;\">#fit linear regression model\n<\/span>model = sm.OLS(y, x).fit()\n\n<span style=\"color: #008080;\">#view model summary\n<\/span>print(model.summary())\n\n                            OLS Regression Results                            \n==================================================== ============================\nDept. Variable: R-squared score: 0.734\nModel: OLS Adj. R-squared: 0.703\nMethod: Least Squares F-statistic: 23.46\nDate: Fri, 24 Jul 2020 Prob (F-statistic): 1.29e-05\nTime: 13:20:31 Log-Likelihood: -60.354\nNo. Observations: 20 AIC: 126.7\nDf Residuals: 17 BIC: 129.7\nDf Model: 2                                         \nCovariance Type: non-robust                                         \n==================================================== ============================\n                 coef std err t P&gt;|t| [0.025 0.975]\n-------------------------------------------------- ----------------------------\nconst 67.6735 2.816 24.033 0.000 61.733 73.614\nhours 5.5557 0.899 6.179 0.000 3.659 7.453\nexams -0.6017 0.914 -0.658 0.519 -2.531 1.327\n==================================================== ============================\nOmnibus: 0.341 Durbin-Watson: 1.506\nProb(Omnibus): 0.843 Jarque-Bera (JB): 0.196\nSkew: -0.216 Prob(JB): 0.907\nKurtosis: 2,782 Cond. No. 10.8\n==================================================== ============================\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\"><strong>\u7b2c 3 \u6b65\uff1a\u89e3\u91ca\u7ed3\u679c\u3002<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u662f\u5982\u4f55\u89e3\u91ca\u7ed3\u679c\u4e2d\u6700\u76f8\u5173\u7684\u6570\u5b57\uff1a<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>R \u5e73\u65b9\uff1a<\/strong> <strong>0.734<\/strong> \u3002\u8fd9\u79f0\u4e3a\u51b3\u5b9a\u7cfb\u6570\u3002\u8fd9\u662f\u53ef\u4ee5\u7531\u9884\u6d4b\u53d8\u91cf\u89e3\u91ca\u7684\u54cd\u5e94\u53d8\u91cf\u65b9\u5dee\u7684\u6bd4\u4f8b\u3002\u5728\u6b64\u793a\u4f8b\u4e2d\uff0c73.4% \u7684\u8003\u8bd5\u6210\u7ee9\u5dee\u5f02\u662f\u7531\u5b66\u4e60\u65f6\u6570\u548c\u53c2\u52a0\u7684\u51c6\u5907\u8003\u8bd5\u6b21\u6570\u6765\u89e3\u91ca\u7684\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>F \u7edf\u8ba1\u91cf\uff1a23.46<\/strong> \u3002\u8fd9\u662f\u56de\u5f52\u6a21\u578b\u7684\u603b\u4f53 F \u7edf\u8ba1\u91cf\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u6982\u7387\uff08F \u7edf\u8ba1\u91cf\uff09\uff1a1.29e-05\u3002<\/strong>\u8fd9\u662f\u4e0e\u603b\u4f53 F \u7edf\u8ba1\u91cf\u76f8\u5173\u7684 p \u503c\u3002\u8fd9\u544a\u8bc9\u6211\u4eec\u56de\u5f52\u6a21\u578b\u4f5c\u4e3a\u4e00\u4e2a\u6574\u4f53\u662f\u5426\u5177\u6709\u7edf\u8ba1\u663e\u7740\u6027\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c\u5b83\u544a\u8bc9\u6211\u4eec\u4e24\u4e2a\u9884\u6d4b\u53d8\u91cf\u7684\u7ec4\u5408\u662f\u5426\u4e0e\u54cd\u5e94\u53d8\u91cf\u5177\u6709\u7edf\u8ba1\u4e0a\u663e\u7740\u7684\u5173\u8054\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0cp \u503c\u5c0f\u4e8e 0.05\uff0c\u8868\u660e\u9884\u6d4b\u53d8\u91cf\u201c\u5b66\u4e60\u65f6\u95f4\u201d\u548c\u201c\u53c2\u52a0\u7684\u51c6\u5907\u8003\u8bd5\u201d\u7ec4\u5408\u4e0e\u8003\u8bd5\u6210\u7ee9\u5177\u6709\u7edf\u8ba1\u663e\u7740\u5173\u8054\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>coef\uff1a<\/strong>\u5047\u8bbe\u5176\u4ed6\u9884\u6d4b\u53d8\u91cf\u4fdd\u6301\u4e0d\u53d8\uff0c\u6bcf\u4e2a\u9884\u6d4b\u53d8\u91cf\u7684\u7cfb\u6570\u544a\u8bc9\u6211\u4eec\u54cd\u5e94\u53d8\u91cf\u7684\u9884\u671f\u5e73\u5747\u53d8\u5316\u3002\u4f8b\u5982\uff0c\u5047\u8bbe\u7ec3\u4e60\u8003\u8bd5\u4fdd\u6301\u4e0d\u53d8\uff0c\u5b66\u4e60\u65f6\u95f4\u6bcf\u589e\u52a0\u4e00\u5c0f\u65f6\uff0c\u5e73\u5747\u8003\u8bd5\u6210\u7ee9\u9884\u8ba1\u4f1a\u589e\u52a0<strong>5.56 \u5206<\/strong>\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u8fd8\u6709\u53e6\u4e00\u79cd\u770b\u5f85\u65b9\u5f0f\uff1a\u5982\u679c\u5b66\u751f A \u548c\u5b66\u751f B \u53c2\u52a0\u7684\u9884\u79d1\u8003\u8bd5\u6b21\u6570\u76f8\u540c\uff0c\u4f46\u5b66\u751f A \u591a\u5b66\u4e60\u4e00\u4e2a\u5c0f\u65f6\uff0c\u90a3\u4e48\u5b66\u751f A \u7684\u5f97\u5206\u5e94\u8be5\u6bd4\u5b66\u751f B \u9ad8<strong>5.56<\/strong>\u5206\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u5c06\u622a\u8ddd\u7cfb\u6570\u89e3\u91ca\u4e3a\u4e0d\u5b66\u4e60\u4efb\u4f55\u65f6\u95f4\u4e14\u4e0d\u53c2\u52a0\u9884\u5907\u8003\u8bd5\u7684\u5b66\u751f\u7684\u9884\u671f\u8003\u8bd5\u6210\u7ee9\u4e3a<strong>67.67<\/strong> \u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>P&gt;|t|\u3002<\/strong>\u5404\u4e2a p \u503c\u544a\u8bc9\u6211\u4eec\u6bcf\u4e2a\u9884\u6d4b\u53d8\u91cf\u662f\u5426\u5177\u6709\u7edf\u8ba1\u663e\u7740\u6027\u3002\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u201c\u5c0f\u65f6\u201d\u5177\u6709\u7edf\u8ba1\u663e\u7740\u6027\uff08p = 0.00\uff09\uff0c\u800c\u201c\u8003\u8bd5\u201d\u5219\u5177\u6709\u7edf\u8ba1\u663e\u7740\u6027<strong>&nbsp;<\/strong> (p = 0.52) \u5728 \u03b1 = 0.05 \u65f6\u4e0d\u5177\u6709\u7edf\u8ba1\u663e\u7740\u6027\u3002\u7531\u4e8e\u201c\u8003\u8bd5\u201d\u4e00\u8bcd\u5728\u7edf\u8ba1\u4e0a\u5e76\u4e0d\u663e\u7740\uff0c\u6211\u4eec\u6700\u7ec8\u53ef\u80fd\u51b3\u5b9a\u5c06\u5176\u4ece\u6a21\u578b\u4e2d\u5220\u9664\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u4f30\u8ba1\u56de\u5f52\u65b9\u7a0b\uff1a<\/strong>\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u6a21\u578b\u8f93\u51fa\u7684\u7cfb\u6570\u6765\u521b\u5efa\u4ee5\u4e0b\u4f30\u8ba1\u56de\u5f52\u65b9\u7a0b\uff1a<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u8003\u8bd5\u6210\u7ee9 = 67.67 + 5.56*(\u5c0f\u65f6) \u2013 0.60*(\u9884\u5907\u8003\u8bd5)<\/strong><\/span><\/p>\n<p data-slot-rendered-dynamic=\"true\"><span style=\"color: #000000;\">\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e2a\u4f30\u8ba1\u7684\u56de\u5f52\u65b9\u7a0b\u6839\u636e\u5b66\u751f\u7684\u5b66\u4e60\u5c0f\u65f6\u6570\u548c\u53c2\u52a0\u7ec3\u4e60\u8003\u8bd5\u7684\u6b21\u6570\u6765\u8ba1\u7b97\u5b66\u751f\u7684\u9884\u671f\u8003\u8bd5\u6210\u7ee9\u3002\u4f8b\u5982\uff0c\u5b66\u4e60\u4e09\u4e2a\u5c0f\u65f6\u5e76\u53c2\u52a0\u9884\u5907\u8003\u8bd5\u7684\u5b66\u751f\u5e94\u8be5\u5f97\u5230<strong>83.75<\/strong>\u7684\u6210\u7ee9\uff1a<\/span><\/p>\n<p data-slot-rendered-dynamic=\"true\"><span style=\"color: #000000;\">\u8bf7\u8bb0\u4f4f\uff0c\u7531\u4e8e\u8fc7\u53bb\u7684\u9884\u5907\u8003\u8bd5\u5728\u7edf\u8ba1\u4e0a\u4e0d\u663e\u7740 (p = 0.52)\uff0c\u6211\u4eec\u53ef\u80fd\u4f1a\u51b3\u5b9a\u5220\u9664\u5b83\u4eec\uff0c\u56e0\u4e3a\u5b83\u4eec\u4e0d\u4f1a\u5bf9\u6574\u4f53\u6a21\u578b\u63d0\u4f9b\u4efb\u4f55\u6539\u8fdb\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u53ef\u4ee5\u4ec5\u4f7f\u7528\u7814\u7a76\u7684\u65f6\u95f4\u4f5c\u4e3a\u9884\u6d4b\u53d8\u91cf\u6765\u6267\u884c\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\u3002<\/span><\/p>\n<p data-slot-rendered-dynamic=\"true\"><span style=\"color: #000000;\"><strong>\u6b65\u9aa4 4\uff1a\u9a8c\u8bc1\u6a21\u578b\u5047\u8bbe\u3002<\/strong><\/span><\/p>\n<p data-slot-rendered-dynamic=\"true\"><span style=\"color: #000000;\">\u6267\u884c\u7ebf\u6027\u56de\u5f52\u540e\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u68c0\u67e5\u51e0\u4e2a\u5047\u8bbe\u4ee5\u786e\u4fdd\u56de\u5f52\u6a21\u578b\u7684\u7ed3\u679c\u53ef\u9760\u3002\u8fd9\u4e9b\u5047\u8bbe\u5305\u62ec\uff1a<\/span><\/p>\n<p data-slot-rendered-dynamic=\"true\"><span style=\"color: #000000;\"><strong>\u5047\u8bbe#1\uff1a<\/strong>\u9884\u6d4b\u53d8\u91cf\u548c\u54cd\u5e94\u53d8\u91cf\u4e4b\u95f4\u5b58\u5728\u7ebf\u6027\u5173\u7cfb\u3002<\/span><\/p>\n<ul>\n<li data-slot-rendered-dynamic=\"true\"><span style=\"color: #000000;\">\u901a\u8fc7\u751f\u6210<a href=\"https:\/\/statorials.org\/cn\/python-\u6b8b\u5dee\u56fe\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u6b8b\u5dee\u56fe<\/a>\u6765\u9a8c\u8bc1\u6b64\u5047\u8bbe\uff0c\u8be5\u6b8b\u5dee\u56fe\u663e\u793a\u56de\u5f52\u6a21\u578b\u6b8b\u5dee\u7684\u62df\u5408\u503c\u3002<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\"><strong>\u5047\u8bbe#2\uff1a<\/strong>\u6b8b\u5dee\u7684\u72ec\u7acb\u6027\u3002<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">\u901a\u8fc7\u6267\u884c<a href=\"https:\/\/statorials.org\/cn\/\u675c\u5bbe\u6c83\u68ee\u6d4b\u8bd5python\/\" target=\"_blank\" rel=\"noopener noreferrer\">Durbin-Watson \u68c0\u9a8c<\/a>\u6765\u9a8c\u8bc1\u8be5\u5047\u8bbe\u3002<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\"><strong>\u5047\u8bbe#3\uff1a<\/strong>\u6b8b\u5dee\u7684\u540c\u65b9\u5dee\u6027\u3002<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">\u901a\u8fc7\u6267\u884c<a href=\"https:\/\/statorials.org\/cn\/breusch\u5f02\u6559\u5f92\u6d4b\u8bd5python\/\" target=\"_blank\" rel=\"noopener noreferrer\">Breusch-Pagan \u68c0\u9a8c<\/a>\u6765\u9a8c\u8bc1\u8fd9\u4e00\u5047\u8bbe\u3002<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\"><strong>\u5047\u8bbe 4\uff1a<\/strong>\u6b8b\u5dee\u7684\u6b63\u6001\u6027\u3002<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">\u4f7f\u7528<a href=\"https:\/\/statorials.org\/cn\/\u4e00\u4e9bpython\u60c5\u8282\/\" target=\"_blank\" rel=\"noopener noreferrer\">QQ \u56fe<\/a>\u76f4\u89c2\u5730\u9a8c\u8bc1\u8fd9\u4e00\u5047\u8bbe\u3002<\/span><\/li>\n<li><span style=\"color: #000000;\">\u901a\u8fc7<a href=\"https:\/\/statorials.org\/cn\/jarque-\u5c06\u6d4b\u8bd5-python\/\" target=\"_blank\" rel=\"noopener noreferrer\">Jarque-Bera \u68c0\u9a8c<\/a>\u6216<a href=\"https:\/\/statorials.org\/cn\/\u5b89\u5fb7\u68ee\u00b7\u5207\u91cc\u6d4b\u8bd5python\/\" target=\"_blank\" rel=\"noopener noreferrer\">Anderson-Darling \u68c0\u9a8c<\/a>\u7b49\u6b63\u5f0f\u68c0\u9a8c\u6765\u9a8c\u8bc1\u8fd9\u4e00\u5047\u8bbe\u3002<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\"><strong>\u5047\u8bbe#5\uff1a<\/strong>\u9a8c\u8bc1\u9884\u6d4b\u53d8\u91cf\u4e4b\u95f4\u4e0d\u5b58\u5728\u591a\u91cd\u5171\u7ebf\u6027\u3002<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">\u901a\u8fc7\u8ba1\u7b97\u6bcf\u4e2a\u9884\u6d4b\u53d8\u91cf\u7684<a href=\"https:\/\/statorials.org\/cn\/\u5982\u4f55\u5728python\u4e2d\u8ba1\u7b97vive\/\" target=\"_blank\" rel=\"noopener noreferrer\">VIF \u503c<\/a>\u6765\u9a8c\u8bc1\u8be5\u5047\u8bbe\u3002<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u5982\u679c\u6ee1\u8db3\u8fd9\u4e9b\u5047\u8bbe\uff0c\u60a8\u53ef\u4ee5\u786e\u4fe1\u591a\u5143\u7ebf\u6027\u56de\u5f52\u6a21\u578b\u7684\u7ed3\u679c\u662f\u53ef\u9760\u7684\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><em>\u60a8\u53ef\u4ee5<a href=\"https:\/\/github.com\/Statorials\/Python-Guides\/blob\/main\/multiple_linear_regression.py\" target=\"_blank\" rel=\"noopener noreferrer\">\u5728\u6b64\u5904<\/a>\u627e\u5230\u672c\u6559\u7a0b\u4e2d\u4f7f\u7528\u7684\u5b8c\u6574 Python \u4ee3\u7801\u3002<\/em><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7ebf\u6027\u56de\u5f52\u662f\u4e00\u79cd\u6211\u4eec\u53ef\u4ee5\u7528\u6765\u7406\u89e3\u4e00\u4e2a\u6216\u591a\u4e2a\u9884\u6d4b\u53d8\u91cf\u4e0e\u54cd\u5e94\u53d8\u91cf\u4e4b\u95f4\u5173\u7cfb\u7684\u65b9\u6cd5\u3002 \u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 Python \u4e2d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-883","post","type-post","status-publish","format-standard","hentry","category-11"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python \u7ebf\u6027\u56de\u5f52\u5b8c\u6574\u6307\u5357 - Statorials<\/title>\n<meta name=\"description\" content=\"\u8fd9\u662f\u6709\u5173\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7ebf\u6027\u56de\u5f52\u7684\u5b8c\u6574\u6307\u5357\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/statorials.org\/cn\/\u7ebf\u6027\u56de\u5f52-python\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python \u7ebf\u6027\u56de\u5f52\u5b8c\u6574\u6307\u5357 - Statorials\" \/>\n<meta property=\"og:description\" content=\"\u8fd9\u662f\u6709\u5173\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7ebf\u6027\u56de\u5f52\u7684\u5b8c\u6574\u6307\u5357\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/cn\/\u7ebf\u6027\u56de\u5f52-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-28T10:48:49+00:00\" \/>\n<meta name=\"author\" content=\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/cn\/%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92-python\/\",\"url\":\"https:\/\/statorials.org\/cn\/%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92-python\/\",\"name\":\"Python \u7ebf\u6027\u56de\u5f52\u5b8c\u6574\u6307\u5357 - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/cn\/#website\"},\"datePublished\":\"2023-07-28T10:48:49+00:00\",\"dateModified\":\"2023-07-28T10:48:49+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261\"},\"description\":\"\u8fd9\u662f\u6709\u5173\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7ebf\u6027\u56de\u5f52\u7684\u5b8c\u6574\u6307\u5357\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/cn\/%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92-python\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/cn\/%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92-python\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/cn\/%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u5bb6\",\"item\":\"https:\/\/statorials.org\/cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python \u7ebf\u6027\u56de\u5f52\u5b8c\u6574\u6307\u5357\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/cn\/#website\",\"url\":\"https:\/\/statorials.org\/cn\/\",\"name\":\"Statorials\",\"description\":\"\u60a8\u7684\u7edf\u8ba1\u7d20\u517b\u6307\u5357\uff01\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/cn\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261\",\"name\":\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\"},\"description\":\"\u5927\u5bb6\u597d\uff0c\u6211\u662f\u672c\u6770\u660e\uff0c\u4e00\u4f4d\u9000\u4f11\u7684\u7edf\u8ba1\u5b66\u6559\u6388\uff0c\u540e\u6765\u6210\u4e3a Statorials \u7684\u70ed\u5fc3\u6559\u5e08\u3002 \u51ed\u501f\u5728\u7edf\u8ba1\u9886\u57df\u7684\u4e30\u5bcc\u7ecf\u9a8c\u548c\u4e13\u4e1a\u77e5\u8bc6\uff0c\u6211\u6e34\u671b\u5206\u4eab\u6211\u7684\u77e5\u8bc6\uff0c\u901a\u8fc7 Statorials \u589e\u5f3a\u5b66\u751f\u7684\u80fd\u529b\u3002\u4e86\u89e3\u66f4\u591a\",\"sameAs\":[\"https:\/\/statorials.org\/cn\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python \u7ebf\u6027\u56de\u5f52\u5b8c\u6574\u6307\u5357 - Statorials","description":"\u8fd9\u662f\u6709\u5173\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7ebf\u6027\u56de\u5f52\u7684\u5b8c\u6574\u6307\u5357\u3002","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:\/\/statorials.org\/cn\/\u7ebf\u6027\u56de\u5f52-python\/","og_locale":"zh_CN","og_type":"article","og_title":"Python \u7ebf\u6027\u56de\u5f52\u5b8c\u6574\u6307\u5357 - Statorials","og_description":"\u8fd9\u662f\u6709\u5173\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7ebf\u6027\u56de\u5f52\u7684\u5b8c\u6574\u6307\u5357\u3002","og_url":"https:\/\/statorials.org\/cn\/\u7ebf\u6027\u56de\u5f52-python\/","og_site_name":"Statorials","article_published_time":"2023-07-28T10:48:49+00:00","author":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/cn\/%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92-python\/","url":"https:\/\/statorials.org\/cn\/%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92-python\/","name":"Python \u7ebf\u6027\u56de\u5f52\u5b8c\u6574\u6307\u5357 - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/cn\/#website"},"datePublished":"2023-07-28T10:48:49+00:00","dateModified":"2023-07-28T10:48:49+00:00","author":{"@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261"},"description":"\u8fd9\u662f\u6709\u5173\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7ebf\u6027\u56de\u5f52\u7684\u5b8c\u6574\u6307\u5357\u3002","breadcrumb":{"@id":"https:\/\/statorials.org\/cn\/%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92-python\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/cn\/%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92-python\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/cn\/%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u5bb6","item":"https:\/\/statorials.org\/cn\/"},{"@type":"ListItem","position":2,"name":"Python \u7ebf\u6027\u56de\u5f52\u5b8c\u6574\u6307\u5357"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/cn\/#website","url":"https:\/\/statorials.org\/cn\/","name":"Statorials","description":"\u60a8\u7684\u7edf\u8ba1\u7d20\u517b\u6307\u5357\uff01","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/cn\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261","name":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/image\/","url":"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a"},"description":"\u5927\u5bb6\u597d\uff0c\u6211\u662f\u672c\u6770\u660e\uff0c\u4e00\u4f4d\u9000\u4f11\u7684\u7edf\u8ba1\u5b66\u6559\u6388\uff0c\u540e\u6765\u6210\u4e3a Statorials \u7684\u70ed\u5fc3\u6559\u5e08\u3002 \u51ed\u501f\u5728\u7edf\u8ba1\u9886\u57df\u7684\u4e30\u5bcc\u7ecf\u9a8c\u548c\u4e13\u4e1a\u77e5\u8bc6\uff0c\u6211\u6e34\u671b\u5206\u4eab\u6211\u7684\u77e5\u8bc6\uff0c\u901a\u8fc7 Statorials \u589e\u5f3a\u5b66\u751f\u7684\u80fd\u529b\u3002\u4e86\u89e3\u66f4\u591a","sameAs":["https:\/\/statorials.org\/cn"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts\/883","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/comments?post=883"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts\/883\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/media?parent=883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/categories?post=883"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/tags?post=883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}