{"id":1649,"date":"2023-07-25T12:50:55","date_gmt":"2023-07-25T12:50:55","guid":{"rendered":"https:\/\/statorials.org\/cn\/python-%e6%9b%b2%e7%ba%bf%e6%8b%9f%e5%90%88\/"},"modified":"2023-07-25T12:50:55","modified_gmt":"2023-07-25T12:50:55","slug":"python-%e6%9b%b2%e7%ba%bf%e6%8b%9f%e5%90%88","status":"publish","type":"post","link":"https:\/\/statorials.org\/cn\/python-%e6%9b%b2%e7%ba%bf%e6%8b%9f%e5%90%88\/","title":{"rendered":"Python \u4e2d\u7684\u66f2\u7ebf\u62df\u5408\uff08\u9644\u793a\u4f8b\uff09"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">\u901a\u5e38\uff0c\u60a8\u53ef\u80fd\u5e0c\u671b\u5728 Python \u4e2d\u5c06\u66f2\u7ebf\u62df\u5408\u5230\u6570\u636e\u96c6\u3002<\/span> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-16261 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/courbepython3.png\" alt=\"\" width=\"392\" height=\"265\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u5206\u6b65\u793a\u4f8b\u8bf4\u660e\u4e86\u5982\u4f55\u4f7f\u7528<a href=\"https:\/\/numpy.org\/doc\/stable\/reference\/generated\/numpy.polyfit.html\" target=\"_blank\" rel=\"noopener\">numpy.polyfit()<\/a>\u51fd\u6570\u5728 Python \u4e2d\u5c06\u66f2\u7ebf\u62df\u5408\u5230\u6570\u636e\uff0c\u4ee5\u53ca\u5982\u4f55\u786e\u5b9a\u54ea\u6761\u66f2\u7ebf\u6700\u9002\u5408\u6570\u636e\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u7b2c 1 \u6b65\uff1a\u521b\u5efa\u6570\u636e\u5e76\u53ef\u89c6\u5316<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u8ba9\u6211\u4eec\u9996\u5148\u521b\u5efa\u4e00\u4e2a\u5047\u6570\u636e\u96c6\uff0c\u7136\u540e\u521b\u5efa\u4e00\u4e2a\u6563\u70b9\u56fe\u6765\u53ef\u89c6\u5316\u6570\u636e\uff1a<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">import<\/span> pandas <span style=\"color: #008000;\">as<\/span> pd\n<span style=\"color: #008000;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #008000;\">as<\/span> plt\n\n<span style=\"color: #008080;\">#createDataFrame\n<\/span>df = pd. <span style=\"color: #3366ff;\">DataFrame<\/span> ({' <span style=\"color: #ff0000;\">x<\/span> ': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],\n                   ' <span style=\"color: #ff0000;\">y<\/span> ': [3, 14, 23, 25, 23, 15, 9, 5, 9, 13, 17, 24, 32, 36, 46]})\n\n<span style=\"color: #008080;\">#create scatterplot of x vs. y\n<\/span>plt. <span style=\"color: #3366ff;\">scatter<\/span> (df. <span style=\"color: #3366ff;\">x<\/span> , df. <span style=\"color: #3366ff;\">y<\/span> )<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-16259 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/courbepython1.png\" alt=\"\" width=\"399\" height=\"269\" srcset=\"\" sizes=\"auto, \"><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u7b2c2\u6b65\uff1a\u8c03\u6574\u591a\u6761\u66f2\u7ebf<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u7136\u540e\uff0c\u8ba9\u6211\u4eec\u5c06\u51e0\u4e2a\u591a\u9879\u5f0f\u56de\u5f52\u6a21\u578b\u62df\u5408\u5230\u6570\u636e\uff0c\u5e76\u5728\u540c\u4e00\u56fe\u4e2d\u53ef\u89c6\u5316\u6bcf\u4e2a\u6a21\u578b\u7684\u66f2\u7ebf\uff1a<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\"><span style=\"color: #000000;\"><span style=\"color: #008000;\">import<\/span> numpy <span style=\"color: #008000;\">as<\/span> np\n\n<span style=\"color: #008080;\">#fit polynomial models up to degree 5\n<\/span>model1 = np. <span style=\"color: #3366ff;\">poly1d<\/span> (np. <span style=\"color: #3366ff;\">polyfit<\/span> (df. <span style=\"color: #3366ff;\">x<\/span> , df. <span style=\"color: #3366ff;\">y<\/span> , 1))\nmodel2 = np. <span style=\"color: #3366ff;\">poly1d<\/span> (np. <span style=\"color: #3366ff;\">polyfit<\/span> (df. <span style=\"color: #3366ff;\">x<\/span> , df. <span style=\"color: #3366ff;\">y<\/span> , 2))\nmodel3 = np. <span style=\"color: #3366ff;\">poly1d<\/span> (np. <span style=\"color: #3366ff;\">polyfit<\/span> (df. <span style=\"color: #3366ff;\">x<\/span> , df. <span style=\"color: #3366ff;\">y<\/span> , 3))\nmodel4 = np. <span style=\"color: #3366ff;\">poly1d<\/span> (np. <span style=\"color: #3366ff;\">polyfit<\/span> (df. <span style=\"color: #3366ff;\">x<\/span> , df. <span style=\"color: #3366ff;\">y<\/span> , 4))\nmodel5 = np. <span style=\"color: #3366ff;\">poly1d<\/span> (np. <span style=\"color: #3366ff;\">polyfit<\/span> (df. <span style=\"color: #3366ff;\">x<\/span> , df. <span style=\"color: #3366ff;\">y<\/span> , 5))\n\n<span style=\"color: #008080;\">#create scatterplot\n<\/span>polyline = np. <span style=\"color: #3366ff;\">linspace<\/span> (1, 15, 50)\nplt. <span style=\"color: #3366ff;\">scatter<\/span> (df. <span style=\"color: #3366ff;\">x<\/span> , df. <span style=\"color: #3366ff;\">y<\/span> )\n\n<span style=\"color: #008080;\">#add fitted polynomial lines to scatterplot \n<\/span>plt. <span style=\"color: #3366ff;\">plot<\/span> (polyline, model1(polyline), color=' <span style=\"color: #ff0000;\">green<\/span> ')\nplt. <span style=\"color: #3366ff;\">plot<\/span> (polyline, model2(polyline), color=' <span style=\"color: #ff0000;\">red<\/span> ')\nplt. <span style=\"color: #3366ff;\">plot<\/span> (polyline, model3(polyline), color=' <span style=\"color: #ff0000;\">purple<\/span> ')\nplt. <span style=\"color: #3366ff;\">plot<\/span> (polyline, model4(polyline), color=' <span style=\"color: #ff0000;\">blue<\/span> ')\nplt. <span style=\"color: #3366ff;\">plot<\/span> (polyline, model5(polyline), color=' <span style=\"color: #ff0000;\">orange<\/span> ')\nplt. <span style=\"color: #3366ff;\">show<\/span> ()\n<\/span><\/span><\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-16260 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/courbepython2.png\" alt=\"\" width=\"408\" height=\"279\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p><span style=\"color: #000000;\">\u4e3a\u4e86\u786e\u5b9a\u54ea\u6761\u66f2\u7ebf\u6700\u9002\u5408\u6570\u636e\uff0c\u6211\u4eec\u53ef\u4ee5\u67e5\u770b\u6bcf\u4e2a\u6a21\u578b\u7684<a href=\"https:\/\/statorials.org\/cn\/r-\u62df\u5408\u4e2d\u7684-r-\u65b9\/\" target=\"_blank\" rel=\"noopener\">\u8c03\u6574\u540e\u7684 R \u65b9<\/a>\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u8be5\u503c\u544a\u8bc9\u6211\u4eec\u53ef\u4ee5\u7531\u6a21\u578b\u4e2d\u7684\u9884\u6d4b\u53d8\u91cf\u89e3\u91ca\u7684\u54cd\u5e94\u53d8\u91cf\u7684\u53d8\u5316\u767e\u5206\u6bd4\uff0c\u5e76\u6839\u636e\u9884\u6d4b\u53d8\u91cf\u7684\u6570\u91cf\u8fdb\u884c\u8c03\u6574\u3002<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#define function to calculate adjusted r-squared\n<span style=\"color: #000000;\"><span style=\"color: #008000;\">def<\/span> adjR(x, y, degree):\n    results = {}\n    coeffs = np. <span style=\"color: #3366ff;\">polyfit<\/span> (x, y, degree)\n    p = np. <span style=\"color: #3366ff;\">poly1d<\/span> (coeffs)\n    yhat = p(x)\n    ybar = np. <span style=\"color: #3366ff;\">sum<\/span> (y)\/len(y)\n    ssreg = np. <span style=\"color: #3366ff;\">sum<\/span> ((yhat-ybar)**2)\n    sstot = np. <span style=\"color: #3366ff;\">sum<\/span> ((y - ybar)**2)\n    results[' <span style=\"color: #ff0000;\">r_squared<\/span> '] = 1- (((1-(ssreg\/sstot))*(len(y)-1))\/(len(y)-degree-1))\n\n    <span style=\"color: #008000;\">return<\/span> results<\/span>\n\n#calculated adjusted R-squared of each model\n<\/span>adjR(df. <span style=\"color: #3366ff;\">x<\/span> , df. <span style=\"color: #3366ff;\">y<\/span> , 1)\nadjR(df. <span style=\"color: #3366ff;\">x<\/span> , df. <span style=\"color: #3366ff;\">y<\/span> , 2)\nadjR(df. <span style=\"color: #3366ff;\">x<\/span> , df. <span style=\"color: #3366ff;\">y<\/span> , 3)\nadjR(df. <span style=\"color: #3366ff;\">x<\/span> , df. <span style=\"color: #3366ff;\">y<\/span> , 4)\nadjR(df. <span style=\"color: #3366ff;\">x<\/span> , df. <span style=\"color: #3366ff;\">y<\/span> , 5)\n\n{'r_squared': 0.3144819}\n{'r_squared': 0.5186706}\n{'r_squared': 0.7842864}\n{'r_squared': 0.9590276}\n{'r_squared': 0.9549709}\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u4ece\u7ed3\u679c\u4e2d\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff0c\u8c03\u6574 R \u5e73\u65b9\u6700\u9ad8\u7684\u6a21\u578b\u662f\u56db\u6b21\u591a\u9879\u5f0f\uff0c\u5176\u8c03\u6574 R \u5e73\u65b9\u4e3a<strong>0.959<\/strong> \u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u7b2c 3 \u6b65\uff1a\u53ef\u89c6\u5316\u6700\u7ec8\u66f2\u7ebf<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u6700\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u7528\u56db\u6b21\u591a\u9879\u5f0f\u6a21\u578b\u7684\u66f2\u7ebf\u521b\u5efa\u6563\u70b9\u56fe\uff1a<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#fit fourth-degree polynomial\n<\/span>model4 = np. <span style=\"color: #3366ff;\">poly1d<\/span> (np. <span style=\"color: #3366ff;\">polyfit<\/span> (df. <span style=\"color: #3366ff;\">x<\/span> , df. <span style=\"color: #3366ff;\">y<\/span> , 4))\n\n<span style=\"color: #008080;\">#define scatterplot\n<\/span>polyline = np. <span style=\"color: #3366ff;\">linspace<\/span> (1, 15, 50)\nplt. <span style=\"color: #3366ff;\">scatter<\/span> (df. <span style=\"color: #3366ff;\">x<\/span> , df. <span style=\"color: #3366ff;\">y<\/span> )\n\n<span style=\"color: #008080;\">#add fitted polynomial curve to scatterplot\n<\/span>plt. <span style=\"color: #3366ff;\">plot<\/span> (polyline, model4(polyline), ' <span style=\"color: #ff0000;\">--<\/span> ', color=' <span style=\"color: #ff0000;\">red<\/span> ')\nplt. <span style=\"color: #3366ff;\">show<\/span> ()\n<\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-16261 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/courbepython3.png\" alt=\"\" width=\"392\" height=\"265\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528<strong>print()<\/strong>\u51fd\u6570\u5f97\u5230\u8be5\u884c\u7684\u65b9\u7a0b\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #993300;\">print<\/span> (model4)\n\n          4 3 2\n-0.01924x + 0.7081x - 8.365x + 35.82x - 26.52\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u66f2\u7ebf\u65b9\u7a0b\u5982\u4e0b\uff1a<\/span><\/p>\n<p> <span style=\"color: #000000;\">y = -0.01924x <sup>4<\/sup> + 0.7081x <sup>3<\/sup> \u2013 8.365x <sup>2<\/sup> + 35.82x \u2013 26.52<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u8be5\u65b9\u7a0b\u6839\u636e\u6a21\u578b\u4e2d\u7684\u9884\u6d4b\u53d8\u91cf\u6765\u9884\u6d4b<a href=\"https:\/\/statorials.org\/cn\/\u53d8\u91cf\u89e3\u91ca\u6027\u53cd\u5e94\/\" target=\"_blank\" rel=\"noopener\">\u54cd\u5e94\u53d8\u91cf<\/a>\u7684\u503c\u3002\u4f8b\u5982\uff0c\u5982\u679c<em>x<\/em> = 4 \u90a3\u4e48\u6211\u4eec\u5c06\u9884\u6d4b<em>y<\/em> = <strong>23.32<\/strong> \uff1a<\/span><\/p>\n<p> <span style=\"color: #000000;\">y = -0.0192(4) <sup>4<\/sup> + 0.7081(4) <sup>3<\/sup> \u2013 8.365(4) <sup>2<\/sup> + 35.82(4) \u2013 26.52 = 23.32<\/span><\/p>\n<h3><span style=\"color: #000000;\"><strong>\u5176\u4ed6\u8d44\u6e90<\/strong><\/span><\/h3>\n<p><a href=\"https:\/\/statorials.org\/cn\/\u591a\u9879\u5f0f\u56de\u5f521\/\" target=\"_blank\" rel=\"noopener\">\u591a\u9879\u5f0f\u56de\u5f52\u7b80\u4ecb<br \/><\/a><a href=\"https:\/\/statorials.org\/cn\/\u591a\u9879\u5f0f\u56de\u5f52-python\/\" target=\"_blank\" rel=\"noopener\">\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u591a\u9879\u5f0f\u56de\u5f52<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u5e38\uff0c\u60a8\u53ef\u80fd\u5e0c\u671b\u5728 Python \u4e2d\u5c06\u66f2\u7ebf\u62df\u5408\u5230\u6570\u636e\u96c6\u3002 \u4ee5\u4e0b\u5206\u6b65\u793a\u4f8b\u8bf4\u660e\u4e86\u5982\u4f55\u4f7f\u7528numpy.polyfit [&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-1649","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 \u4e2d\u7684\u66f2\u7ebf\u62df\u5408\uff08\u5e26\u6709\u793a\u4f8b\uff09-Statorials<\/title>\n<meta name=\"description\" content=\"\u672c\u6559\u7a0b\u901a\u8fc7\u51e0\u4e2a\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u5728 Python \u4e2d\u62df\u5408\u66f2\u7ebf\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\/python-\u66f2\u7ebf\u62df\u5408\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python \u4e2d\u7684\u66f2\u7ebf\u62df\u5408\uff08\u5e26\u6709\u793a\u4f8b\uff09-Statorials\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6559\u7a0b\u901a\u8fc7\u51e0\u4e2a\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u5728 Python \u4e2d\u62df\u5408\u66f2\u7ebf\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/cn\/python-\u66f2\u7ebf\u62df\u5408\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-25T12:50:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/courbepython3.png\" \/>\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=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/cn\/python-%e6%9b%b2%e7%ba%bf%e6%8b%9f%e5%90%88\/\",\"url\":\"https:\/\/statorials.org\/cn\/python-%e6%9b%b2%e7%ba%bf%e6%8b%9f%e5%90%88\/\",\"name\":\"Python \u4e2d\u7684\u66f2\u7ebf\u62df\u5408\uff08\u5e26\u6709\u793a\u4f8b\uff09-Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/cn\/#website\"},\"datePublished\":\"2023-07-25T12:50:55+00:00\",\"dateModified\":\"2023-07-25T12:50:55+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261\"},\"description\":\"\u672c\u6559\u7a0b\u901a\u8fc7\u51e0\u4e2a\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u5728 Python \u4e2d\u62df\u5408\u66f2\u7ebf\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/cn\/python-%e6%9b%b2%e7%ba%bf%e6%8b%9f%e5%90%88\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/cn\/python-%e6%9b%b2%e7%ba%bf%e6%8b%9f%e5%90%88\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/cn\/python-%e6%9b%b2%e7%ba%bf%e6%8b%9f%e5%90%88\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u5bb6\",\"item\":\"https:\/\/statorials.org\/cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python \u4e2d\u7684\u66f2\u7ebf\u62df\u5408\uff08\u9644\u793a\u4f8b\uff09\"}]},{\"@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 \u4e2d\u7684\u66f2\u7ebf\u62df\u5408\uff08\u5e26\u6709\u793a\u4f8b\uff09-Statorials","description":"\u672c\u6559\u7a0b\u901a\u8fc7\u51e0\u4e2a\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u5728 Python \u4e2d\u62df\u5408\u66f2\u7ebf\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\/python-\u66f2\u7ebf\u62df\u5408\/","og_locale":"zh_CN","og_type":"article","og_title":"Python \u4e2d\u7684\u66f2\u7ebf\u62df\u5408\uff08\u5e26\u6709\u793a\u4f8b\uff09-Statorials","og_description":"\u672c\u6559\u7a0b\u901a\u8fc7\u51e0\u4e2a\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u5728 Python \u4e2d\u62df\u5408\u66f2\u7ebf\u3002","og_url":"https:\/\/statorials.org\/cn\/python-\u66f2\u7ebf\u62df\u5408\/","og_site_name":"Statorials","article_published_time":"2023-07-25T12:50:55+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/courbepython3.png"}],"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":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/cn\/python-%e6%9b%b2%e7%ba%bf%e6%8b%9f%e5%90%88\/","url":"https:\/\/statorials.org\/cn\/python-%e6%9b%b2%e7%ba%bf%e6%8b%9f%e5%90%88\/","name":"Python \u4e2d\u7684\u66f2\u7ebf\u62df\u5408\uff08\u5e26\u6709\u793a\u4f8b\uff09-Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/cn\/#website"},"datePublished":"2023-07-25T12:50:55+00:00","dateModified":"2023-07-25T12:50:55+00:00","author":{"@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261"},"description":"\u672c\u6559\u7a0b\u901a\u8fc7\u51e0\u4e2a\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u5728 Python \u4e2d\u62df\u5408\u66f2\u7ebf\u3002","breadcrumb":{"@id":"https:\/\/statorials.org\/cn\/python-%e6%9b%b2%e7%ba%bf%e6%8b%9f%e5%90%88\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/cn\/python-%e6%9b%b2%e7%ba%bf%e6%8b%9f%e5%90%88\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/cn\/python-%e6%9b%b2%e7%ba%bf%e6%8b%9f%e5%90%88\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u5bb6","item":"https:\/\/statorials.org\/cn\/"},{"@type":"ListItem","position":2,"name":"Python \u4e2d\u7684\u66f2\u7ebf\u62df\u5408\uff08\u9644\u793a\u4f8b\uff09"}]},{"@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\/1649","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=1649"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts\/1649\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/media?parent=1649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/categories?post=1649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/tags?post=1649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}