{"id":70050,"date":"2024-01-29T16:01:08","date_gmt":"2024-01-29T08:01:08","guid":{"rendered":"https:\/\/docs.pingcode.com\/?p=70050"},"modified":"2024-01-29T16:01:09","modified_gmt":"2024-01-29T08:01:09","slug":"%e6%9c%89%e5%93%aa%e4%ba%9b%e4%bc%98%e7%a7%80%e7%9a%84-python-%e5%ba%93","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/70050.html","title":{"rendered":"\u6709\u54ea\u4e9b\u4f18\u79c0\u7684 Python \u5e93"},"content":{"rendered":"<p>\u6807\u9898\uff1a\u63a2\u7d22\u4f18\u79c0\u7684Python\u5e93\u2014\u2014\u63d0\u5347\u4ee3\u7801\u6548\u7387\u4e0e\u529f\u80fd\u6027<\/p>\n<p>\u6458\u8981\uff1a<strong>Python\u7684\u5f3a\u5927\u4e4b\u5904\u5728\u4e8e\u5176\u4e30\u5bcc\u7684\u5e93\u8d44\u6e90<\/strong>,1\u3001<strong>\u6570\u636e\u5206\u6790<\/strong>\u9886\u57df\u7684<strong>pandas<\/strong>\uff1b2\u3001<strong>\u6570\u636e\u53ef\u89c6\u5316<\/strong>\u63a8\u8350\u4f7f\u7528<strong>Matplotlib<\/strong>\u4e0e<strong>Seaborn<\/strong>\uff1b3\u3001<strong><a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a><\/strong>\u5219\u79bb\u4e0d\u5f00<strong>scikit-learn<\/strong>\uff1b4\u3001<strong>\u7f51\u7edc\u722c\u866b<\/strong>\u65b9\u9762\u7ecf\u5178\u4e4b\u9009\u4e3a<strong>Requests<\/strong>\u548c<strong>BeautifulSoup<\/strong>\uff1b5\u3001<strong>Web\u5f00\u53d1<\/strong>\u5219\u4ee5<strong>Django<\/strong>\u548c<strong>Flask<\/strong>\u4e3a\u4f7c\u4f7c\u8005\u3002\u5176\u4e2d\uff0c<strong>pandas\u5e93<\/strong>\uff0c\u4ee5\u5176\u9ad8\u6548\u7684\u6570\u636e\u64cd\u4f5c\u80fd\u529b\u548c\u7b80\u6d01\u7684API\u8bbe\u8ba1\uff0c\u6210\u4e3a\u6570\u636e\u5206\u6790\u5e08\u548c\u79d1\u5b66\u5bb6\u8fdb\u884c\u6570\u636e\u63a2\u7d22\u548c\u6e05\u6d17\u5de5\u4f5c\u7684\u9996\u9009\u3002<\/p>\n<p><strong>\u4e00\u3001\u6570\u636e\u5904\u7406\u4e0e\u5206\u6790<\/strong><\/p>\n<p>Python\u62e5\u6709\u4f17\u591a\u5e93\u7528\u4e8e\u7b80\u5316\u6570\u636e\u5904\u7406\u548c\u5206\u6790\u8fc7\u7a0b\u3002\u5728\u6b64\u9886\u57df\uff0c*pandas* \u5b9e\u73b0\u4e86DataFrame\u7ed3\u6784\u6765\u4f18\u96c5\u5730\u5904\u7406\u8868\u683c\u6570\u636e\u3002\u652f\u6301\u4e0d\u540c\u7c7b\u578b\u7684\u6570\u636e\u8f93\u5165\u8f93\u51fa\uff0c\u5e7f\u6cdb\u7684\u6570\u636e\u64cd\u4f5c\u6280\u672f\uff0c\u5982\u5206\u7ec4\u3001\u5408\u5e76\u3001\u7b5b\u9009\u7b49\uff0c\u662f\u6570\u636e\u5206\u6790\u4e0d\u53ef\u6216\u7f3a\u7684\u5de5\u5177\u3002<\/p>\n<p>\u53e6\u4e00\u4e2a\u5e93\uff0c*NumPy* \u63d0\u4f9b\u4e86\u9ad8\u6548\u7684\u591a\u7ef4\u6570\u7ec4\u64cd\u4f5c\u548c\u5927\u91cf\u7684\u6570\u5b66\u51fd\u6570\uff0c\u4e0epandas\u534f\u4f5c\u65e0\u95f4\uff0c\u4e00\u8d77\u6784\u6210\u4e86Python\u6570\u636e\u5206\u6790\u7684\u9ec4\u91d1\u642d\u6863\u3002<\/p>\n<p><strong>\u4e8c\u3001\u6570\u636e\u53ef\u89c6\u5316\u5de5\u5177<\/strong><\/p>\n<p>\u6570\u636e\u5206\u6790\u4e2d\uff0c\u53ef\u89c6\u5316\u662f\u5173\u952e\u7684\u4e00\u73af\u3002*Matplotlib* \u5341\u5206\u7ecf\u5178\uff0c\u5176\u4e8c\u7ef4\u7ed8\u56fe\u5e93\u5141\u8bb8\u7528\u6237\u521b\u5efa\u9ad8\u54c1\u8d28\u7684\u56fe\u5f62\u3002\u7531\u4e8e\u5176\u7075\u6d3b\u6027\uff0c\u7528\u6237\u51e0\u4e4e\u53ef\u4ee5\u5b9a\u5236\u4efb\u4f55\u5143\u7d20\u3002<\/p>\n<p>\u800c*Seaborn* \u5efa\u7acb\u5728Matplotlib\u4e4b\u4e0a\uff0c\u63d0\u4f9b\u4e86\u66f4\u591a\u9ed8\u8ba4\u7684\u914d\u7f6e\uff0c\u4f7f\u5f97\u4f5c\u56fe\u6b65\u9aa4\u66f4\u4e3a\u7b80\u6d01\uff0c\u56fe\u5f62\u66f4\u4e3a\u7f8e\u89c2\uff0c\u7279\u522b\u9002\u5408\u7edf\u8ba1\u6570\u636e\u7684\u53ef\u89c6\u5316\u3002<\/p>\n<p><strong>\u4e09\u3001\u673a\u5668\u5b66\u4e60\u6846\u67b6<\/strong><\/p>\n<p>\u673a\u5668\u5b66\u4e60\u9886\u57df\uff0c*scikit-learn* \u63d0\u4f9b\u4e86\u5927\u91cf\u7b80\u6613\u4f7f\u7528\u3001\u9ad8\u6548\u548c\u53ef\u590d\u7528\u7684\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\u3002\u5b83\u57fa\u4e8eNumPy\u548cSciPy\uff0c\u8fd9\u4f7f\u5176\u6210\u4e3a\u5728\u79d1\u5b66\u8ba1\u7b97\u4efb\u52a1\u4e2d\u975e\u5e38\u5f3a\u5927\u7684\u5de5\u5177\u3002<\/p>\n<p>\u5bf9\u4e8e\u6df1\u5ea6\u5b66\u4e60\uff0c*TensorFlow* \u548c *Keras* \u662f\u5e7f\u53d7\u6b22\u8fce\u7684\u5e93\uff0cTensorFlow\u4ee5\u5176\u5f3a\u5927\u7684\u751f\u4ea7\u73af\u5883\u548c\u5206\u5e03\u5f0f\u8ba1\u7b97\u80fd\u529b\u5907\u53d7\u9752\u7750\uff0c\u800cKeras\u4e3aTensorFlow\u7684\u9ad8\u7ea7API\uff0c\u4f7f\u5f97\u6a21\u578b\u6784\u5efa\u53d8\u5f97\u66f4\u52a0\u7b80\u5355\u3002<\/p>\n<p><strong>\u56db\u3001\u7f51\u7edc\u722c\u866b\u5de5\u5177<\/strong><\/p>\n<p>\u7f51\u7edc\u722c\u866b\u65b9\u9762\uff0c*Requests* \u5e93\u80fd\u591f\u8ba9HTTP\u8bf7\u6c42\u53d8\u5f97\u8f7b\u677e\uff0c\u800c*BeautifulSoup* \u5219\u662f\u89e3\u6790HTML\u548cXML\u6587\u4ef6\u7684\u9ad8\u624b\u3002\u7ed3\u5408\u4f7f\u7528\uff0c\u5b83\u4eec\u80fd\u591f\u8f7b\u6613\u6293\u53d6\u548c\u5206\u6790\u7f51\u9875\u5185\u5bb9\u3002<\/p>\n<p>\u5bf9\u4e8e\u66f4\u590d\u6742\u7684\u7f51\u7edc\u722c\u866b\u4efb\u52a1\uff0c*Scrapy* \u662f\u4e00\u4e2a\u5feb\u901f\u9ad8\u5c42\u6b21\u7684\u5c4f\u5e55\u6293\u53d6\u548c\u7f51\u7edc\u722c\u866b\u6846\u67b6\uff0c\u5b83\u4e3a\u7528\u6237\u63d0\u4f9b\u4e86\u6570\u636e\u5b58\u50a8\u3001\u6570\u636e\u4e0b\u8f7d\u7b49\u4e00\u7cfb\u5217\u4fbf\u5229\u3002<\/p>\n<p><strong>\u4e94\u3001Web\u5f00\u53d1\u6846\u67b6<\/strong><\/p>\n<p>*Django* \u662f\u4e00\u4e2a\u9ad8\u7ea7\u7684Python Web\u6846\u67b6\uff0c\u5b83\u9f13\u52b1\u5feb\u901f\u5f00\u53d1\u548c\u5e72\u51c0\u3001\u5b9e\u7528\u7684\u8bbe\u8ba1\u3002\u53e6\u4e00\u65b9\u9762\uff0c*Flask* \u662f\u8f7b\u91cf\u7ea7Web\u6846\u67b6\uff0c\u4e0eDjango\u76f8\u6bd4\uff0c\u66f4\u52a0\u7b80\u5355\u7075\u6d3b\u3002<\/p>\n<p>\u7efc\u4e0a\u6240\u8ff0\uff0cPython\u5e93\u7684\u591a\u6837\u6027\u4e0e\u5f3a\u5927\u529f\u80fd\u4f7f\u5f97\u5b83\u9002\u7528\u4e8e\u5404\u79cd\u573a\u666f\u4e0b\u7684\u7f16\u7a0b\u9700\u8981\u3002\u4ee5\u4e0a\u63d0\u5230\u7684\u5e93\u4ec5\u662f\u51b0\u5c71\u4e00\u89d2\uff0c\u5176\u80cc\u540e\u8fd8\u6709\u65e0\u6570\u4f18\u79c0\u7684\u5e93\u7b49\u5f85\u88ab\u53d1\u73b0\u548c\u5e94\u7528\u3002 \u7ed3\u5408\u7279\u5b9a\u9879\u76ee\u9700\u6c42\uff0c\u8fd9\u4e9b\u5e93\u80fd\u591f\u5e2e\u52a9\u5f00\u53d1\u8005\u663e\u8457\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\uff0c\u589e\u5f3a\u5e94\u7528\u7684\u529f\u80fd\u6027\u548c\u7a33\u5b9a\u6027\uff0c\u662fPython\u751f\u6001\u4e2d\u4e0d\u53ef\u6216\u7f3a\u7684\u5b9d\u8d35\u8d44\u6e90\u3002<\/p>\n<p> <strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><strong>1. \u6709\u4ec0\u4e48\u4f18\u79c0\u7684 Python \u6570\u636e\u5206\u6790\u5e93\uff1f<\/strong><\/p>\n<p>Python\u62e5\u6709\u591a\u4e2a\u4f18\u79c0\u7684\u6570\u636e\u5206\u6790\u5e93\uff0c\u5982Pandas\u3001NumPy\u548cSciPy\u3002Pandas\u63d0\u4f9b\u4e86\u7075\u6d3b\u7684\u6570\u636e\u7ed3\u6784\u548c\u6570\u636e\u5206\u6790\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765\u5904\u7406\u5927\u578b\u6570\u636e\u96c6\u3002NumPy\u662fPython\u7684\u4e00\u4e2a\u79d1\u5b66\u8ba1\u7b97\u5e93\uff0c\u7528\u4e8e\u652f\u6301\u5927\u578b\u591a\u7ef4\u6570\u7ec4\u548c\u77e9\u9635\u8fd0\u7b97\uff0c\u4ee5\u53ca\u9ad8\u7ea7\u6570\u5b66\u51fd\u6570\u3002SciPy\u5efa\u7acb\u5728NumPy\u4e4b\u4e0a\uff0c\u63d0\u4f9b\u4e86\u8bb8\u591a\u79d1\u5b66\u548c\u5de5\u7a0b\u8ba1\u7b97\u7684\u529f\u80fd\u3002<\/p>\n<p><strong>2. \u6709\u54ea\u4e9b\u4f18\u79c0\u7684 Python \u56fe\u5f62\u5316\u5e93\uff1f<\/strong><\/p>\n<p>Python\u7684\u56fe\u5f62\u5316\u5e93\u4e2d\uff0cMatplotlib\u662f\u6700\u5e38\u7528\u7684\u7ed8\u56fe\u5e93\uff0c\u7528\u4e8e\u521b\u5efa\u5404\u79cd\u7c7b\u578b\u7684\u56fe\u5f62\uff0c\u5982\u6298\u7ebf\u56fe\u3001\u6563\u70b9\u56fe\u3001\u76f4\u65b9\u56fe\u7b49\u3002Seaborn\u5efa\u7acb\u5728Matplotlib\u4e4b\u4e0a\uff0c\u63d0\u4f9b\u66f4\u9ad8\u7ea7\u7684\u7edf\u8ba1\u56fe\u5f62\u3002Bokeh\u548cPlotly\u8fd9\u4e24\u4e2a\u5e93\u90fd\u652f\u6301\u4ea4\u4e92\u5f0f\u56fe\u5f62\uff0c\u5e76\u4e14\u53ef\u4ee5\u5728Web\u5e94\u7528\u4e2d\u4f7f\u7528\u3002<\/p>\n<p><strong>3. \u6709\u54ea\u4e9b\u4f18\u79c0\u7684 Python \u673a\u5668\u5b66\u4e60\u5e93\uff1f<\/strong><\/p>\n<p>Python\u673a\u5668\u5b66\u4e60\u5e93\u4e2d\uff0cScikit-learn\u662f\u6700\u6d41\u884c\u7684\u4e00\u4e2a\uff0c\u63d0\u4f9b\u4e86\u8bb8\u591a\u7528\u4e8e\u5206\u7c7b\u3001\u805a\u7c7b\u3001\u56de\u5f52\u548c\u964d\u7ef4\u7684\u7b97\u6cd5\u3002TensorFlow\u548cPyTorch\u662f\u4e24\u4e2a\u6d41\u884c\u7684\u6df1\u5ea6\u5b66\u4e60\u5e93\uff0c\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u795e\u7ecf\u7f51\u7edc\u5de5\u5177\u548c\u6a21\u578b\u3002Keras\u662f\u4e00\u4e2a\u9ad8\u7ea7\u795e\u7ecf\u7f51\u7edc\u5e93\uff0c\u53ef\u4ee5\u57fa\u4e8eTensorFlow\u6216Theano\u8fd0\u884c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u6807\u9898\uff1a\u63a2\u7d22\u4f18\u79c0\u7684Python\u5e93\u2014\u2014\u63d0\u5347\u4ee3\u7801\u6548\u7387\u4e0e\u529f\u80fd\u6027 \u6458\u8981\uff1aPython\u7684\u5f3a\u5927\u4e4b\u5904\u5728\u4e8e\u5176\u4e30\u5bcc\u7684\u5e93\u8d44\u6e90,1\u3001\u6570 [&hellip;]","protected":false},"author":1,"featured_media":70055,"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\/70050"}],"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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=70050"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/70050\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/70055"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=70050"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=70050"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=70050"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}