{"id":948845,"date":"2024-12-27T00:07:21","date_gmt":"2024-12-26T16:07:21","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/948845.html"},"modified":"2024-12-27T00:07:23","modified_gmt":"2024-12-26T16:07:23","slug":"python%e5%a6%82%e4%bd%95%e5%90%88%e5%b9%b6%e8%a1%8c","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/948845.html","title":{"rendered":"python\u5982\u4f55\u5408\u5e76\u884c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25084040\/3775973e-2124-4288-9d51-b6cda4778527.webp\" alt=\"python\u5982\u4f55\u5408\u5e76\u884c\" \/><\/p>\n<p><p> <strong>Python\u5408\u5e76\u884c\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528\u5b57\u7b26\u4e32\u64cd\u4f5c\u3001\u5217\u8868\u64cd\u4f5c\u3001Pandas\u5e93\u7b49\u3002\u5e38\u89c1\u7684\u65b9\u6cd5\u6709\uff1a\u5b57\u7b26\u4e32\u62fc\u63a5\u3001\u5217\u8868\u63a8\u5bfc\u5f0f\u3001Pandas\u7684concat\u51fd\u6570\u3002<\/strong> \u5176\u4e2d\uff0cPandas\u662f\u5904\u7406\u7ed3\u6784\u5316\u6570\u636e\u7684\u5f3a\u5927\u5de5\u5177\uff0c\u9002\u5408\u7528\u4e8e\u5904\u7406\u5927\u578b\u6570\u636e\u96c6\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u63a2\u8ba8\u8fd9\u4e9b\u65b9\u6cd5\u53ca\u5176\u5177\u4f53\u5e94\u7528\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5b57\u7b26\u4e32\u64cd\u4f5c<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u5b57\u7b26\u4e32\u662f\u4e00\u4e2a\u975e\u5e38\u57fa\u7840\u7684\u6570\u636e\u7c7b\u578b\u3002\u5408\u5e76\u884c\u901a\u5e38\u6d89\u53ca\u5c06\u591a\u4e2a\u5b57\u7b26\u4e32\u5408\u5e76\u6210\u4e00\u4e2a\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u4f7f\u7528<code>+<\/code>\u8fd0\u7b97\u7b26<\/strong><\/li>\n<\/ol>\n<p><p>\u8fd9\u662f\u6700\u76f4\u63a5\u7684\u5408\u5e76\u65b9\u5f0f\uff0c\u901a\u8fc7\u5c06\u591a\u4e2a\u5b57\u7b26\u4e32\u901a\u8fc7<code>+<\/code>\u8fd0\u7b97\u7b26\u8fde\u63a5\u5728\u4e00\u8d77\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">line1 = &quot;Hello&quot;<\/p>\n<p>line2 = &quot;World&quot;<\/p>\n<p>combined_line = line1 + &quot; &quot; + line2<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u7b80\u5355\u6613\u61c2\uff0c\u4f46\u5728\u5904\u7406\u5927\u91cf\u6570\u636e\u65f6\u6548\u7387\u8f83\u4f4e\uff0c\u56e0\u4e3a\u6bcf\u6b21\u4f7f\u7528<code>+<\/code>\u90fd\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5b57\u7b26\u4e32\u5bf9\u8c61\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u4f7f\u7528<code>join()<\/code>\u65b9\u6cd5<\/strong><\/li>\n<\/ol>\n<p><p><code>join()<\/code>\u662f\u5b57\u7b26\u4e32\u5bf9\u8c61\u7684\u4e00\u4e2a\u65b9\u6cd5\uff0c\u7528\u4e8e\u8fde\u63a5\u5b57\u7b26\u4e32\u5e8f\u5217\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">lines = [&quot;Hello&quot;, &quot;World&quot;, &quot;Python&quot;]<\/p>\n<p>combined_line = &quot; &quot;.join(lines)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>join()<\/code>\u65b9\u6cd5\u6bd4<code>+<\/code>\u8fd0\u7b97\u7b26\u66f4\u9ad8\u6548\uff0c\u7279\u522b\u662f\u5728\u5904\u7406\u957f\u5b57\u7b26\u4e32\u6216\u5927\u91cf\u6570\u636e\u65f6\u3002\u8fd9\u662f\u56e0\u4e3a<code>join()<\/code>\u65b9\u6cd5\u53ea\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5b57\u7b26\u4e32\u5bf9\u8c61\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u5217\u8868\u64cd\u4f5c<\/p>\n<\/p>\n<p><p>Python\u7684\u5217\u8868\u662f\u4e00\u4e2a\u975e\u5e38\u7075\u6d3b\u7684\u6570\u636e\u7ed3\u6784\uff0c\u53ef\u4ee5\u7528\u4e8e\u5408\u5e76\u884c\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5217\u8868\u63a8\u5bfc\u5f0f<\/strong><\/li>\n<\/ol>\n<p><p>\u5217\u8868\u63a8\u5bfc\u5f0f\u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u6d01\u7684\u65b9\u5f0f\u6765\u521b\u5efa\u5217\u8868\u3002\u5b83\u53ef\u4ee5\u7528\u4e8e\u5408\u5e76\u591a\u4e2a\u5b57\u7b26\u4e32\u5217\u8868\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">lines1 = [&quot;Hello&quot;, &quot;World&quot;]<\/p>\n<p>lines2 = [&quot;Python&quot;, &quot;Programming&quot;]<\/p>\n<p>combined_lines = [line1 + &quot; &quot; + line2 for line1, line2 in zip(lines1, lines2)]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u901a\u8fc7<code>zip()<\/code>\u51fd\u6570\u5c06\u4e24\u4e2a\u5217\u8868\u7ec4\u5408\u5728\u4e00\u8d77\uff0c\u7136\u540e\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u5408\u5e76\u6bcf\u5bf9\u5b57\u7b26\u4e32\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u6269\u5c55\uff08extend\uff09\u65b9\u6cd5<\/strong><\/li>\n<\/ol>\n<p><p><code>extend()<\/code>\u65b9\u6cd5\u7528\u4e8e\u5c06\u4e00\u4e2a\u5217\u8868\u4e2d\u7684\u6240\u6709\u5143\u7d20\u6dfb\u52a0\u5230\u53e6\u4e00\u4e2a\u5217\u8868\u4e2d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">lines1 = [&quot;Hello&quot;, &quot;World&quot;]<\/p>\n<p>lines2 = [&quot;Python&quot;, &quot;Programming&quot;]<\/p>\n<p>lines1.extend(lines2)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u65b9\u6cd5\u9002\u7528\u4e8e\u4f60\u60f3\u8981\u5c06\u4e00\u4e2a\u5217\u8868\u7684\u5185\u5bb9\u6dfb\u52a0\u5230\u53e6\u4e00\u4e2a\u5217\u8868\u7684\u60c5\u51b5\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001Pandas\u5e93<\/p>\n<\/p>\n<p><p>Pandas\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u6570\u636e\u5206\u6790\u5e93\uff0c\u5c24\u5176\u5728\u5904\u7406\u5927\u578b\u6570\u636e\u96c6\u65f6\u975e\u5e38\u6709\u6548\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>concat\u51fd\u6570<\/strong><\/li>\n<\/ol>\n<p><p>Pandas\u7684<code>concat()<\/code>\u51fd\u6570\u53ef\u4ee5\u7528\u4e8e\u6cbf\u4e00\u4e2a\u8f74\u5c06\u591a\u4e2a\u5bf9\u8c61\u8fde\u63a5\u5728\u4e00\u8d77\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>df1 = pd.DataFrame({&quot;A&quot;: [&quot;A0&quot;, &quot;A1&quot;], &quot;B&quot;: [&quot;B0&quot;, &quot;B1&quot;]})<\/p>\n<p>df2 = pd.DataFrame({&quot;A&quot;: [&quot;A2&quot;, &quot;A3&quot;], &quot;B&quot;: [&quot;B2&quot;, &quot;B3&quot;]})<\/p>\n<p>result = pd.concat([df1, df2])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>concat()<\/code>\u51fd\u6570\u53ef\u4ee5\u7528\u4e8e\u5408\u5e76\u6570\u636e\u6846\uff0c\u6307\u5b9a<code>axis=0<\/code>\u8868\u793a\u6cbf\u884c\u5408\u5e76\uff0c<code>axis=1<\/code>\u8868\u793a\u6cbf\u5217\u5408\u5e76\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>merge\u51fd\u6570<\/strong><\/li>\n<\/ol>\n<p><p><code>merge()<\/code>\u51fd\u6570\u7528\u4e8e\u6839\u636e\u4e00\u4e2a\u6216\u591a\u4e2a\u952e\u5c06\u6570\u636e\u6846\u5408\u5e76\u5728\u4e00\u8d77\uff0c\u7c7b\u4f3c\u4e8eSQL\u4e2d\u7684<code>JOIN<\/code>\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">left = pd.DataFrame({&quot;key&quot;: [&quot;K0&quot;, &quot;K1&quot;, &quot;K2&quot;], &quot;A&quot;: [&quot;A0&quot;, &quot;A1&quot;, &quot;A2&quot;]})<\/p>\n<p>right = pd.DataFrame({&quot;key&quot;: [&quot;K0&quot;, &quot;K1&quot;, &quot;K2&quot;], &quot;B&quot;: [&quot;B0&quot;, &quot;B1&quot;, &quot;B2&quot;]})<\/p>\n<p>result = pd.merge(left, right, on=&quot;key&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>merge()<\/code>\u51fd\u6570\u975e\u5e38\u9002\u5408\u7528\u4e8e\u9700\u8981\u6839\u636e\u67d0\u4e2a\u952e\u8fdb\u884c\u5408\u5e76\u7684\u60c5\u51b5\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u5e94\u7528\u573a\u666f<\/p>\n<\/p>\n<ol>\n<li><strong>\u5904\u7406\u6587\u672c\u6587\u4ef6<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u5904\u7406\u6587\u672c\u6587\u4ef6\u65f6\uff0c\u7ecf\u5e38\u9700\u8981\u5408\u5e76\u591a\u884c\u6587\u672c\u4e3a\u4e00\u884c\u3002\u53ef\u4ee5\u4f7f\u7528\u5b57\u7b26\u4e32\u64cd\u4f5c\u6216\u6587\u4ef6\u8bfb\u5199\u6765\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&quot;file.txt&quot;, &quot;r&quot;) as file:<\/p>\n<p>    lines = file.readlines()<\/p>\n<p>combined_line = &quot;&quot;.join(line.strip() for line in lines)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u9002\u7528\u4e8e\u9700\u8981\u5904\u7406\u5927\u6587\u672c\u6587\u4ef6\u7684\u573a\u666f\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u6570\u636e\u6e05\u6d17<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u6570\u636e\u6e05\u6d17\u8fc7\u7a0b\u4e2d\uff0c\u7ecf\u5e38\u9700\u8981\u5408\u5e76\u591a\u5217\u6570\u636e\u4e3a\u4e00\u5217\uff0c\u6216\u5408\u5e76\u591a\u4e2a\u6570\u636e\u6846\u3002\u8fd9\u65f6\uff0cPandas\u5e93\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u5de5\u5177\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>df = pd.DataFrame({<\/p>\n<p>    &quot;first_name&quot;: [&quot;John&quot;, &quot;Jane&quot;],<\/p>\n<p>    &quot;last_name&quot;: [&quot;Doe&quot;, &quot;Smith&quot;]<\/p>\n<p>})<\/p>\n<p>df[&quot;full_name&quot;] = df[&quot;first_name&quot;] + &quot; &quot; + df[&quot;last_name&quot;]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u8f7b\u677e\u5408\u5e76\u6570\u636e\u6846\u4e2d\u7684\u591a\u5217\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u6027\u80fd\u4f18\u5316<\/p>\n<\/p>\n<p><p>\u5728\u5904\u7406\u5927\u89c4\u6a21\u6570\u636e\u65f6\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u4ee5\u63d0\u9ad8\u6548\u7387\u662f\u5f88\u91cd\u8981\u7684\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u4f7f\u7528\u751f\u6210\u5668\u8868\u8fbe\u5f0f<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u9700\u8981\u5904\u7406\u5927\u91cf\u6570\u636e\u65f6\uff0c\u751f\u6210\u5668\u8868\u8fbe\u5f0f\u6bd4\u5217\u8868\u63a8\u5bfc\u5f0f\u66f4\u8282\u7701\u5185\u5b58\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">combined_line = &quot; &quot;.join(line.strip() for line in open(&quot;file.txt&quot;))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u4f7f\u7528NumPy\u6570\u7ec4<\/strong><\/li>\n<\/ol>\n<p><p>NumPy\u662fPython\u4e2d\u4e00\u4e2a\u975e\u5e38\u9ad8\u6548\u7684\u6570\u7ec4\u5904\u7406\u5e93\uff0c\u5728\u5904\u7406\u6570\u503c\u578b\u6570\u636e\u65f6\uff0c\u4f7f\u7528NumPy\u6570\u7ec4\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u6027\u80fd\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>array1 = np.array([&quot;A0&quot;, &quot;A1&quot;, &quot;A2&quot;])<\/p>\n<p>array2 = np.array([&quot;B0&quot;, &quot;B1&quot;, &quot;B2&quot;])<\/p>\n<p>combined_array = np.char.add(array1, array2)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u9ad8\u6548\u5408\u5e76\u6570\u503c\u578b\u6570\u636e\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001\u9519\u8bef\u5904\u7406<\/p>\n<\/p>\n<p><p>\u5728\u5408\u5e76\u884c\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u9519\u8bef\uff0c\u5982\u6570\u636e\u7c7b\u578b\u4e0d\u5339\u914d\u3001\u7f3a\u5931\u503c\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u6570\u636e\u7c7b\u578b\u68c0\u67e5<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u5408\u5e76\u6570\u636e\u4e4b\u524d\uff0c\u786e\u4fdd\u6240\u6709\u5f85\u5408\u5e76\u7684\u6570\u636e\u7c7b\u578b\u4e00\u81f4\uff0c\u53ef\u4ee5\u4f7f\u7528<code>assert<\/code>\u8bed\u53e5\u8fdb\u884c\u68c0\u67e5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">assert all(isinstance(line, str) for line in lines), &quot;All elements must be strings&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u5904\u7406\u7f3a\u5931\u503c<\/strong><\/li>\n<\/ol>\n<p><p>\u5728\u5408\u5e76\u6570\u636e\u6846\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u7f3a\u5931\u503c\uff0c\u8fd9\u65f6\u53ef\u4ee5\u4f7f\u7528Pandas\u63d0\u4f9b\u7684<code>fillna()<\/code>\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">df = pd.DataFrame({<\/p>\n<p>    &quot;A&quot;: [&quot;A0&quot;, None, &quot;A2&quot;],<\/p>\n<p>    &quot;B&quot;: [&quot;B0&quot;, &quot;B1&quot;, None]<\/p>\n<p>})<\/p>\n<p>df.fillna(&quot;Missing&quot;, inplace=True)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u786e\u4fdd\u6570\u636e\u7684\u4e00\u81f4\u6027\u3002<\/p>\n<\/p>\n<p><p>\u7efc\u4e0a\u6240\u8ff0\uff0cPython\u63d0\u4f9b\u4e86\u591a\u79cd\u5408\u5e76\u884c\u7684\u65b9\u6cd5\uff0c\u4ece\u7b80\u5355\u7684\u5b57\u7b26\u4e32\u64cd\u4f5c\u5230\u590d\u6742\u7684\u6570\u636e\u6846\u5408\u5e76\uff0c\u7528\u6237\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u3002\u5728\u5904\u7406\u5927\u578b\u6570\u636e\u96c6\u65f6\uff0cPandas\u5e93\u662f\u4e00\u4e2a\u975e\u5e38\u6709\u7528\u7684\u5de5\u5177\uff0c\u800c\u5728\u5904\u7406\u6587\u672c\u6570\u636e\u65f6\uff0c\u5b57\u7b26\u4e32\u548c\u5217\u8868\u64cd\u4f5c\u5219\u66f4\u52a0\u76f4\u63a5\u548c\u9ad8\u6548\u3002\u65e0\u8bba\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\uff0c\u4e86\u89e3\u5176\u4f18\u7f3a\u70b9\u4ee5\u53ca\u9002\u7528\u573a\u666f\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5408\u5e76\u591a\u884c\u6570\u636e\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u5408\u5e76\u591a\u884c\u6570\u636e\u901a\u5e38\u6d89\u53ca\u5230\u4f7f\u7528Pandas\u5e93\u3002\u53ef\u4ee5\u901a\u8fc7<code>concat()<\/code>\u6216<code>append()<\/code>\u65b9\u6cd5\u5c06\u591a\u4e2aDataFrame\u5408\u5e76\u6210\u4e00\u4e2a\u3002\u5177\u4f53\u64cd\u4f5c\u5305\u62ec\u521b\u5efa\u4e00\u4e2aDataFrame\u5217\u8868\uff0c\u7136\u540e\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\u5c06\u5176\u5408\u5e76\uff0c\u6700\u7ec8\u5f97\u5230\u4e00\u4e2a\u65b0\u7684DataFrame\u3002<\/p>\n<p><strong>\u4f7f\u7528Python\u5408\u5e76\u884c\u65f6\uff0c\u662f\u5426\u9700\u8981\u8003\u8651\u6570\u636e\u7c7b\u578b\uff1f<\/strong><br \/>\u662f\u7684\uff0c\u5408\u5e76\u884c\u65f6\u9700\u8981\u786e\u4fdd\u6570\u636e\u7c7b\u578b\u7684\u4e00\u81f4\u6027\u3002\u4f8b\u5982\uff0c\u82e5\u67d0\u4e00\u5217\u7684\u6570\u636e\u7c7b\u578b\u4e3a\u6574\u6570\uff0c\u5408\u5e76\u7684\u5176\u4ed6\u884c\u4e5f\u5e94\u786e\u4fdd\u8be5\u5217\u4e3a\u6574\u6570\u7c7b\u578b\uff0c\u4ee5\u907f\u514d\u6570\u636e\u7c7b\u578b\u4e0d\u5339\u914d\u7684\u95ee\u9898\uff0c\u8fdb\u800c\u5bfc\u81f4\u5408\u5e76\u5931\u8d25\u6216\u6570\u636e\u9519\u8bef\u3002<\/p>\n<p><strong>\u5728\u5408\u5e76\u884c\u65f6\uff0c\u5982\u4f55\u5904\u7406\u91cd\u590d\u6570\u636e\uff1f<\/strong><br \/>\u5728\u5408\u5e76\u884c\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528<code>drop_duplicates()<\/code>\u65b9\u6cd5\u6765\u79fb\u9664\u91cd\u590d\u6570\u636e\uff0c\u786e\u4fdd\u6700\u7ec8\u7ed3\u679c\u7684\u552f\u4e00\u6027\u3002\u6b64\u5916\uff0c\u5408\u5e76\u65f6\u4e5f\u53ef\u4ee5\u8bbe\u7f6e\u53c2\u6570\u6765\u4fdd\u7559\u6216\u4e22\u5f03\u91cd\u590d\u7684\u884c\uff0c\u4ee5\u8fbe\u5230\u6240\u9700\u7684\u6570\u636e\u6574\u5408\u6548\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u5408\u5e76\u884c\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528\u5b57\u7b26\u4e32\u64cd\u4f5c\u3001\u5217\u8868\u64cd\u4f5c\u3001Pandas\u5e93\u7b49\u3002\u5e38\u89c1\u7684\u65b9\u6cd5\u6709\uff1a\u5b57\u7b26\u4e32\u62fc\u63a5\u3001\u5217\u8868 [&hellip;]","protected":false},"author":3,"featured_media":948852,"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\/948845"}],"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=948845"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/948845\/revisions"}],"predecessor-version":[{"id":948854,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/948845\/revisions\/948854"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/948852"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=948845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=948845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=948845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}