{"id":884,"date":"2025-01-11T15:50:32","date_gmt":"2025-01-11T07:50:32","guid":{"rendered":"https:\/\/www.laixuexila.com\/?p=884"},"modified":"2025-01-11T15:50:32","modified_gmt":"2025-01-11T07:50:32","slug":"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8python%e8%bf%9b%e8%a1%8c%e6%95%b0%e6%8d%ae%e5%88%86%e6%9e%90%ef%bc%9a%e5%ae%9e%e7%94%a8%e6%8a%80%e5%b7%a7%e4%b8%8e%e5%b7%a5%e5%85%b7%e6%8e%a8%e8%8d%90","status":"publish","type":"post","link":"https:\/\/www.laixuexila.com\/index.php\/2025\/01\/11\/%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8python%e8%bf%9b%e8%a1%8c%e6%95%b0%e6%8d%ae%e5%88%86%e6%9e%90%ef%bc%9a%e5%ae%9e%e7%94%a8%e6%8a%80%e5%b7%a7%e4%b8%8e%e5%b7%a5%e5%85%b7%e6%8e%a8%e8%8d%90\/","title":{"rendered":"\u5982\u4f55\u4f7f\u7528Python\u8fdb\u884c\u6570\u636e\u5206\u6790\uff1a\u5b9e\u7528\u6280\u5de7\u4e0e\u5de5\u5177\u63a8\u8350"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Python \u662f\u6570\u636e\u5206\u6790\u9886\u57df\u6700\u6d41\u884c\u7684\u7f16\u7a0b\u8bed\u8a00\u4e4b\u4e00\uff0c\u5177\u6709\u5f3a\u5927\u7684\u5e93\u652f\u6301\u548c\u6613\u4e8e\u4f7f\u7528\u7684\u8bed\u6cd5\uff0c\u9002\u5408\u7528\u4e8e\u6570\u636e\u6e05\u6d17\u3001\u5206\u6790\u3001\u53ef\u89c6\u5316\u4ee5\u53ca\u673a\u5668\u5b66\u4e60\u7b49\u4efb\u52a1\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528 Python \u8fdb\u884c\u6570\u636e\u5206\u6790\uff0c\u5e76\u63a8\u8350\u4e00\u4e9b\u5e38\u7528\u7684\u5de5\u5177\u548c\u6280\u5de7\u3002<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u5b89\u88c5\u548c\u914d\u7f6e\u73af\u5883<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u5f00\u59cb\u6570\u636e\u5206\u6790\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u914d\u7f6e\u4e00\u4e2a\u5408\u9002\u7684\u5f00\u53d1\u73af\u5883\u3002\u63a8\u8350\u4f7f\u7528 <strong>Anaconda<\/strong>\uff0c\u5b83\u662f\u4e00\u4e2a\u5f00\u6e90\u7684 Python \u6570\u636e\u79d1\u5b66\u5e73\u53f0\uff0c\u5305\u542b\u4e86\u8bb8\u591a\u5e38\u7528\u7684\u79d1\u5b66\u8ba1\u7b97\u5e93\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u5b89\u88c5 Anaconda\uff1a<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u8bbf\u95ee <a href=\"https:\/\/www.anaconda.com\/products\/individual\">Anaconda \u5b98\u7f51<\/a>\uff0c\u4e0b\u8f7d\u9002\u5408\u4f60\u64cd\u4f5c\u7cfb\u7edf\u7684\u7248\u672c\u3002<\/li>\n\n\n\n<li>\u5b89\u88c5\u540e\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528 <strong>Anaconda Prompt<\/strong> \u6765\u7ba1\u7406\u865a\u62df\u73af\u5883\u548c\u5305\u3002<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5\u597d\u4e4b\u540e\uff0c\u4f60\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u865a\u62df\u73af\u5883\u6765\u8fdb\u884c\u6570\u636e\u5206\u6790\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>conda create -n data_analysis python=3.9\nconda activate data_analysis<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u5e38\u7528\u7684 Python \u6570\u636e\u5206\u6790\u5e93<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u8fdb\u884c\u6570\u636e\u5206\u6790\u65f6\uff0cPython \u6709\u4e00\u7cfb\u5217\u5f3a\u5927\u7684\u5e93\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5904\u7406\u548c\u5206\u6790\u6570\u636e\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u6700\u5e38\u7528\u7684\u5e93\uff1a<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">2.1 <strong>NumPy<\/strong> \u2014 \u6570\u503c\u8ba1\u7b97<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>NumPy<\/strong> \u662f\u8fdb\u884c\u6570\u503c\u8ba1\u7b97\u548c\u6570\u636e\u64cd\u4f5c\u7684\u57fa\u7840\u5e93\uff0c\u5c24\u5176\u64c5\u957f\u5904\u7406\u77e9\u9635\u548c\u6570\u7ec4\u3002\u5b83\u63d0\u4f9b\u4e86\u9ad8\u6548\u7684\u6570\u7ec4\u5bf9\u8c61 <code>ndarray<\/code>\uff0c\u5e76\u4e14\u53ef\u4ee5\u8fdb\u884c\u5411\u91cf\u5316\u64cd\u4f5c\uff0c\u4ece\u800c\u52a0\u901f\u6570\u503c\u8ba1\u7b97\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install numpy<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5e38\u7528\u529f\u80fd\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u521b\u5efa\u591a\u7ef4\u6570\u7ec4\uff1a<code>np.array()<\/code><\/li>\n\n\n\n<li>\u6570\u7ec4\u8fd0\u7b97\uff1a\u52a0\u3001\u51cf\u3001\u4e58\u3001\u9664\u3001\u77e9\u9635\u4e58\u6cd5\u7b49<\/li>\n\n\n\n<li>\u7edf\u8ba1\u8ba1\u7b97\uff1a\u5747\u503c\u3001\u6807\u51c6\u5dee\u3001\u65b9\u5dee\u7b49<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>import numpy as np\n\n# \u521b\u5efa\u6570\u7ec4\narr = np.array(&#91;1, 2, 3, 4])\nprint(arr + 1)  # \u8f93\u51fa &#91;2, 3, 4, 5]\n\n# \u8ba1\u7b97\u5747\u503c\nprint(np.mean(arr))  # \u8f93\u51fa 2.5<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">2.2 <strong>Pandas<\/strong> \u2014 \u6570\u636e\u5904\u7406\u4e0e\u5206\u6790<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Pandas<\/strong> \u662f\u4e00\u4e2a\u7528\u4e8e\u6570\u636e\u6e05\u6d17\u3001\u5206\u6790\u548c\u64cd\u4f5c\u7684\u5e93\uff0c\u63d0\u4f9b\u4e86 <code>DataFrame<\/code> \u548c <code>Series<\/code> \u6570\u636e\u7ed3\u6784\uff0c\u652f\u6301\u6570\u636e\u8bfb\u53d6\u3001\u6e05\u6d17\u3001\u8f6c\u6362\u3001\u5408\u5e76\u548c\u5206\u6790\u7b49\u64cd\u4f5c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install pandas<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5e38\u7528\u529f\u80fd\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8bfb\u53d6 CSV \u6587\u4ef6\uff1a<code>pd.read_csv()<\/code><\/li>\n\n\n\n<li>\u6570\u636e\u9009\u62e9\u4e0e\u8fc7\u6ee4<\/li>\n\n\n\n<li>\u5206\u7ec4\u64cd\u4f5c\uff08<code>groupby<\/code>\uff09<\/li>\n\n\n\n<li>\u6570\u636e\u5904\u7406\uff1a\u7f3a\u5931\u503c\u586b\u5145\u3001\u5220\u9664\u3001\u91cd\u547d\u540d\u7b49<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>import pandas as pd\n\n# \u8bfb\u53d6 CSV \u6587\u4ef6\ndf = pd.read_csv('data.csv')\n\n# \u6570\u636e\u9884\u89c8\nprint(df.head())\n\n# \u7b5b\u9009\u6570\u636e\nfiltered_df = df&#91;df&#91;'age'] &gt; 30]\n\n# \u7f3a\u5931\u503c\u5904\u7406\ndf.fillna(0, inplace=True)<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">2.3 <strong>Matplotlib<\/strong> \u548c <strong>Seaborn<\/strong> \u2014 \u6570\u636e\u53ef\u89c6\u5316<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Matplotlib<\/strong> \u662f\u4e00\u4e2a\u57fa\u7840\u7684\u7ed8\u56fe\u5e93\uff0c\u652f\u6301\u751f\u6210\u9759\u6001\u3001\u52a8\u6001\u3001\u4ea4\u4e92\u5f0f\u56fe\u8868\u3002\u800c <strong>Seaborn<\/strong> \u662f\u57fa\u4e8e Matplotlib \u7684\u9ad8\u7ea7\u53ef\u89c6\u5316\u5e93\uff0c\u63d0\u4f9b\u4e86\u66f4\u52a0\u7b80\u4fbf\u7684 API \u548c\u7f8e\u89c2\u7684\u9ed8\u8ba4\u6837\u5f0f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install matplotlib seaborn<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5e38\u7528\u529f\u80fd\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Matplotlib<\/strong>\uff1a\u7ed8\u5236\u6298\u7ebf\u56fe\u3001\u67f1\u72b6\u56fe\u3001\u6563\u70b9\u56fe\u7b49\u3002<\/li>\n\n\n\n<li><strong>Seaborn<\/strong>\uff1a\u7b80\u5316\u6570\u636e\u53ef\u89c6\u5316\u8fc7\u7a0b\uff0c\u652f\u6301\u66f4\u4e30\u5bcc\u7684\u56fe\u5f62\uff08\u4f8b\u5982\u7bb1\u7ebf\u56fe\u3001\u70ed\u529b\u56fe\u7b49\uff09\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>import matplotlib.pyplot as plt\nimport seaborn as sns\n\n# \u7ed8\u5236\u7b80\u5355\u7684\u6298\u7ebf\u56fe\nplt.plot(&#91;1, 2, 3, 4], &#91;10, 20, 25, 30])\nplt.xlabel('X')\nplt.ylabel('Y')\nplt.show()\n\n# \u4f7f\u7528 Seaborn \u7ed8\u5236\u7bb1\u7ebf\u56fe\nsns.boxplot(x='category', y='value', data=df)\nplt.show()<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">2.4 <strong>Scikit-learn<\/strong> \u2014 \u673a\u5668\u5b66\u4e60<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Scikit-learn<\/strong> \u662f Python \u4e2d\u6700\u6d41\u884c\u7684\u673a\u5668\u5b66\u4e60\u5e93\uff0c\u63d0\u4f9b\u4e86\u8bb8\u591a\u6807\u51c6\u7684\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\uff0c\u5305\u62ec\u56de\u5f52\u3001\u5206\u7c7b\u3001\u805a\u7c7b\u7b49\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install scikit-learn<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5e38\u7528\u529f\u80fd\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6570\u636e\u9884\u5904\u7406\uff08\u6807\u51c6\u5316\u3001\u5f52\u4e00\u5316\uff09<\/li>\n\n\n\n<li>\u6a21\u578b\u8bad\u7ec3\u548c\u8bc4\u4f30<\/li>\n\n\n\n<li>\u8d85\u53c2\u6570\u8c03\u4f18<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>from sklearn.model_selection import train_test_split\nfrom sklearn.linear_model import LinearRegression\n\n# \u6570\u636e\u5206\u5272\nX_train, X_test, y_train, y_test = train_test_split(df&#91;&#91;'feature1', 'feature2']], df&#91;'target'], test_size=0.2)\n\n# \u521b\u5efa\u6a21\u578b\u5e76\u8bad\u7ec3\nmodel = LinearRegression()\nmodel.fit(X_train, y_train)\n\n# \u9884\u6d4b\npredictions = model.predict(X_test)<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">2.5 <strong>SciPy<\/strong> \u2014 \u79d1\u5b66\u8ba1\u7b97<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>SciPy<\/strong> \u662f\u4e00\u4e2a\u57fa\u4e8e NumPy \u7684\u5e93\uff0c\u63d0\u4f9b\u4e86\u8bb8\u591a\u7528\u4e8e\u79d1\u5b66\u548c\u5de5\u7a0b\u8ba1\u7b97\u7684\u51fd\u6570\uff0c\u5982\u79ef\u5206\u3001\u4f18\u5316\u3001\u7ebf\u6027\u4ee3\u6570\u7b49\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install scipy<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5e38\u7528\u529f\u80fd\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6570\u5b66\u51fd\u6570\uff1a\u79ef\u5206\u3001\u6700\u4f18\u5316\u7b49<\/li>\n\n\n\n<li>\u4fe1\u53f7\u5904\u7406<\/li>\n\n\n\n<li>\u7edf\u8ba1\u5206\u5e03\u548c\u6d4b\u8bd5<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>from scipy import stats\n\n# \u751f\u6210\u4e00\u4e2a\u6b63\u6001\u5206\u5e03\ndata = stats.norm.rvs(size=1000)\n\n# \u8fdb\u884c\u6b63\u6001\u6027\u68c0\u9a8c\nprint(stats.shapiro(data))<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u6570\u636e\u5206\u6790\u7684\u5b9e\u7528\u6280\u5de7<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">3.1 \u6570\u636e\u6e05\u6d17<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u6570\u636e\u6e05\u6d17\u662f\u6570\u636e\u5206\u6790\u8fc7\u7a0b\u4e2d\u6700\u91cd\u8981\u7684\u6b65\u9aa4\u4e4b\u4e00\uff0c\u901a\u5e38\u5305\u542b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5904\u7406\u7f3a\u5931\u503c\uff1a\u53ef\u4ee5\u4f7f\u7528 <code>fillna()<\/code> \u6216 <code>dropna()<\/code> \u586b\u5145\u6216\u5220\u9664\u7f3a\u5931\u6570\u636e\u3002<\/li>\n\n\n\n<li>\u53bb\u9664\u91cd\u590d\u6570\u636e\uff1a\u4f7f\u7528 <code>drop_duplicates()<\/code> \u5220\u9664\u91cd\u590d\u7684\u884c\u3002<\/li>\n\n\n\n<li>\u8f6c\u6362\u6570\u636e\u7c7b\u578b\uff1a\u4f7f\u7528 <code>astype()<\/code> \u65b9\u6cd5\u6765\u786e\u4fdd\u5217\u7684\u6570\u636e\u7c7b\u578b\u6b63\u786e\u3002<\/li>\n\n\n\n<li>\u6570\u636e\u6807\u51c6\u5316\u548c\u5f52\u4e00\u5316\uff1a\u5c24\u5176\u5728\u673a\u5668\u5b66\u4e60\u4e2d\uff0c\u9700\u8981\u5c06\u6570\u636e\u7f29\u653e\u5230\u76f8\u540c\u7684\u8303\u56f4\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># \u586b\u5145\u7f3a\u5931\u503c\ndf&#91;'column_name'].fillna(df&#91;'column_name'].mean(), inplace=True)\n\n# \u5220\u9664\u91cd\u590d\u884c\ndf.drop_duplicates(inplace=True)\n\n# \u8f6c\u6362\u6570\u636e\u7c7b\u578b\ndf&#91;'column_name'] = df&#91;'column_name'].astype('float64')<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">3.2 \u63a2\u7d22\u6027\u6570\u636e\u5206\u6790\uff08EDA\uff09<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7\u7edf\u8ba1\u63cf\u8ff0\u3001\u6570\u636e\u53ef\u89c6\u5316\u548c\u7b80\u5355\u7684\u6c47\u603b\u6765\u63a2\u7d22\u6570\u636e\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u7edf\u8ba1\u63cf\u8ff0<\/strong>\uff1a\u4f7f\u7528 <code>describe()<\/code> \u65b9\u6cd5\u6765\u67e5\u770b\u6570\u636e\u7684\u5206\u5e03\u3001\u5747\u503c\u3001\u6807\u51c6\u5dee\u7b49\u3002<\/li>\n\n\n\n<li><strong>\u5206\u5e03\u5206\u6790<\/strong>\uff1a\u4f7f\u7528\u76f4\u65b9\u56fe\u6216\u7bb1\u7ebf\u56fe\u6765\u89c2\u5bdf\u6570\u636e\u7684\u5206\u5e03\u3002<\/li>\n\n\n\n<li><strong>\u76f8\u5173\u6027\u5206\u6790<\/strong>\uff1a\u4f7f\u7528\u6563\u70b9\u56fe\u6216\u70ed\u529b\u56fe\u6765\u5206\u6790\u53d8\u91cf\u4e4b\u95f4\u7684\u76f8\u5173\u6027\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># \u7edf\u8ba1\u63cf\u8ff0\nprint(df.describe())\n\n# \u53ef\u89c6\u5316\u6570\u636e\u5206\u5e03\nsns.histplot(df&#91;'column_name'])\nplt.show()\n\n# \u76f8\u5173\u6027\u77e9\u9635\nsns.heatmap(df.corr(), annot=True)\nplt.show()<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">3.3 \u9ad8\u6548\u7684\u8ba1\u7b97\u4e0e\u5185\u5b58\u4f18\u5316<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4f7f\u7528 <strong>NumPy<\/strong> \u548c <strong>Pandas<\/strong> \u7684\u5411\u91cf\u5316\u64cd\u4f5c\u6765\u63d0\u9ad8\u6548\u7387\uff0c\u907f\u514d\u4f7f\u7528\u5faa\u73af\u3002<\/li>\n\n\n\n<li>\u5bf9\u4e8e\u975e\u5e38\u5927\u7684\u6570\u636e\u96c6\uff0c\u53ef\u4ee5\u4f7f\u7528 <strong>Dask<\/strong> \u6216 <strong>Vaex<\/strong> \u8fd9\u7c7b\u53ef\u4ee5\u5904\u7406\u8d85\u5927\u6570\u636e\u7684\u5e93\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># \u4f7f\u7528 NumPy \u8fdb\u884c\u5411\u91cf\u5316\u8fd0\u7b97\ndf&#91;'new_column'] = np.log(df&#91;'column_name'])<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">4. \u6570\u636e\u5206\u6790\u7684\u5e38\u89c1\u5de5\u4f5c\u6d41\u7a0b<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u6570\u636e\u52a0\u8f7d<\/strong>\uff1a\u4f7f\u7528 Pandas \u8bfb\u53d6 CSV\u3001Excel\u3001SQL \u6570\u636e\u7b49\u3002<\/li>\n\n\n\n<li><strong>\u6570\u636e\u6e05\u6d17<\/strong>\uff1a\u5904\u7406\u7f3a\u5931\u503c\u3001\u91cd\u590d\u6570\u636e\u3001\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u7b49\u3002<\/li>\n\n\n\n<li><strong>\u63a2\u7d22\u6027\u6570\u636e\u5206\u6790<\/strong>\uff1a\u4e86\u89e3\u6570\u636e\u7684\u57fa\u672c\u60c5\u51b5\u548c\u5206\u5e03\uff0c\u7ed8\u5236\u53ef\u89c6\u5316\u56fe\u8868\u3002<\/li>\n\n\n\n<li><strong>\u6570\u636e\u5efa\u6a21\u4e0e\u5206\u6790<\/strong>\uff1a\u5e94\u7528\u7edf\u8ba1\u65b9\u6cd5\u6216\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\uff0c\u6784\u5efa\u6a21\u578b\u8fdb\u884c\u9884\u6d4b\u6216\u5206\u6790\u3002<\/li>\n\n\n\n<li><strong>\u62a5\u544a\u4e0e\u5c55\u793a<\/strong>\uff1a\u4f7f\u7528\u56fe\u8868\u548c\u6587\u5b57\u603b\u7ed3\u5206\u6790\u7ed3\u679c\uff0c\u751f\u6210\u62a5\u544a\u6216\u5c55\u793a\u7ed9\u76f8\u5173\u4eba\u5458\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">5. \u6570\u636e\u5206\u6790\u5e38\u7528\u7684\u5de5\u5177\u4e0e\u73af\u5883<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Jupyter Notebook<\/strong>\uff1a\u4e00\u4e2a\u57fa\u4e8e\u6d4f\u89c8\u5668\u7684\u4ea4\u4e92\u5f0f\u8ba1\u7b97\u73af\u5883\uff0c\u975e\u5e38\u9002\u5408\u6570\u636e\u5206\u6790\u548c\u53ef\u89c6\u5316\u3002<\/li>\n\n\n\n<li><strong>VS Code<\/strong>\uff1a\u73b0\u4ee3\u5316\u7684\u5f00\u53d1\u73af\u5883\uff0c\u652f\u6301 Python \u548c Jupyter Notebook\uff0c\u53ef\u4ee5\u9ad8\u6548\u7f16\u5199\u5206\u6790\u4ee3\u7801\u3002<\/li>\n\n\n\n<li><strong>Google Colab<\/strong>\uff1a\u7c7b\u4f3c Jupyter Notebook \u7684\u5728\u7ebf\u73af\u5883\uff0c\u63d0\u4f9b\u514d\u8d39\u7684 GPU \u52a0\u901f\uff0c\u975e\u5e38\u9002\u5408\u673a\u5668\u5b66\u4e60\u4efb\u52a1\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">6. \u603b\u7ed3<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Python \u4e3a\u6570\u636e\u5206\u6790\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u5de5\u5177\u548c\u5e93\u652f\u6301\uff0c\u4ece\u6570\u636e\u6e05\u6d17\u3001\u5904\u7406\u5230\u5efa\u6a21\u3001\u53ef\u89c6\u5316\u90fd\u53ef\u4ee5\u901a\u8fc7 Python \u5b9e\u73b0\u3002\u638c\u63e1 <strong>NumPy<\/strong>\u3001<strong>Pandas<\/strong>\u3001<strong>Matplotlib<\/strong>\u3001<strong>Scikit-learn<\/strong> \u7b49\u5de5\u5177\u5c06\u5927\u5927\u63d0\u5347\u4f60\u7684\u6570\u636e\u5206\u6790\u80fd\u529b\uff0c\u5e76\u5e2e\u52a9\u4f60\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\u9ad8\u6548\u5730\u5904\u7406\u548c\u5206\u6790\u6570\u636e\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u63a8\u8350\u5b66\u4e60\u8def\u5f84<\/strong>\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5b66\u4e60 <strong>Pandas<\/strong> \u548c <strong>NumPy<\/strong>\uff0c\u638c\u63e1\u6570\u636e\u6e05\u6d17\u548c\u57fa\u672c\u5206\u6790\u6280\u80fd\u3002<\/li>\n\n\n\n<li>\u5b66\u4e60 <strong>Matplotlib<\/strong> \u548c <strong>Seaborn<\/strong>\uff0c\u63d0\u9ad8\u6570\u636e\u53ef\u89c6\u5316\u80fd\u529b\u3002<\/li>\n\n\n\n<li>\u638c\u63e1 <strong>Scikit-learn<\/strong> \u548c\u673a\u5668\u5b66\u4e60\u76f8\u5173\u6280\u672f\u3002<\/li>\n\n\n\n<li>\u6df1\u5165\u5b66\u4e60\u6570\u636e\u5efa\u6a21\u548c\u7edf\u8ba1\u5206\u6790\u65b9\u6cd5\u3002<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7\u4e0d\u65ad\u7ec3\u4e60\u548c\u5b9e\u8df5\uff0c\u4f60\u5c06<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u80fd\u591f\u6210\u4e3a\u4e00\u4e2a\u719f\u7ec3\u7684\u6570\u636e\u5206\u6790\u5e08\uff0c\u5e76\u80fd\u591f\u5e94\u5bf9\u590d\u6742\u7684\u73b0\u5b9e\u95ee\u9898\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python \u662f\u6570\u636e\u5206\u6790\u9886\u57df\u6700\u6d41\u884c\u7684\u7f16\u7a0b\u8bed\u8a00\u4e4b\u4e00\uff0c\u5177\u6709\u5f3a\u5927\u7684\u5e93\u652f\u6301\u548c\u6613\u4e8e\u4f7f\u7528\u7684\u8bed\u6cd5\uff0c\u9002\u5408\u7528\u4e8e\u6570\u636e\u6e05\u6d17\u3001\u5206\u6790\u3001\u53ef [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54],"tags":[],"class_list":["post-884","post","type-post","status-publish","format-standard","hentry","category-python"],"_links":{"self":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/comments?post=884"}],"version-history":[{"count":1,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/884\/revisions"}],"predecessor-version":[{"id":885,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/884\/revisions\/885"}],"wp:attachment":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/media?parent=884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/categories?post=884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/tags?post=884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}