{"id":1061408,"date":"2024-12-31T15:42:29","date_gmt":"2024-12-31T07:42:29","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1061408.html"},"modified":"2024-12-31T15:42:33","modified_gmt":"2024-12-31T07:42:33","slug":"python%e5%a6%82%e4%bd%95%e5%b0%86%e7%9f%a9%e9%98%b5%e6%8c%89%e5%88%97%e6%89%93%e4%b9%b1","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1061408.html","title":{"rendered":"Python\u5982\u4f55\u5c06\u77e9\u9635\u6309\u5217\u6253\u4e71"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/11608a85-ea2a-4029-a11e-d9c2ca37ab33.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"Python\u5982\u4f55\u5c06\u77e9\u9635\u6309\u5217\u6253\u4e71\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u5c06\u77e9\u9635\u6309\u5217\u6253\u4e71\u7684\u65b9\u6cd5\u6709\u51e0\u79cd\uff1a\u4f7f\u7528NumPy\u5e93\u3001\u4f7f\u7528Pandas\u5e93\u3001\u624b\u52a8\u5b9e\u73b0\u5217\u6253\u4e71\u3002<\/strong> \u5728\u8fd9\u91cc\uff0c\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528NumPy\u5e93\u6765\u5b9e\u73b0\u8fd9\u4e00\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><p>NumPy\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u6570\u503c\u8ba1\u7b97\u5e93\uff0c\u63d0\u4f9b\u4e86\u8bb8\u591a\u7528\u4e8e\u64cd\u4f5c\u6570\u7ec4\u548c\u77e9\u9635\u7684\u51fd\u6570\u3002\u5728\u4f7f\u7528NumPy\u5e93\u6253\u4e71\u77e9\u9635\u7684\u5217\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<code>numpy.random.shuffle<\/code>\u51fd\u6570\u3002\u8fd9\u4e2a\u51fd\u6570\u53ef\u4ee5\u5bf9\u6570\u7ec4\u7684\u67d0\u4e00\u7ef4\u5ea6\u8fdb\u884c\u968f\u673a\u6253\u4e71\uff0c\u9002\u7528\u4e8e\u6211\u4eec\u7684\u9700\u6c42\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u63cf\u8ff0\u8fd9\u4e2a\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5b89\u88c5\u548c\u5bfc\u5165NumPy\u5e93<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u786e\u4fdd\u5df2\u7ecf\u5b89\u88c5\u4e86NumPy\u5e93\u3002\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u53ef\u4ee5\u4f7f\u7528pip\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-sh\">pip install numpy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u63a5\u7740\uff0c\u5728Python\u811a\u672c\u4e2d\u5bfc\u5165NumPy\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u521b\u5efa\u4e00\u4e2a\u793a\u4f8b\u77e9\u9635<\/h3>\n<\/p>\n<p><p>\u6211\u4eec\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u793a\u4f8b\u77e9\u9635\u6765\u5c55\u793a\u5982\u4f55\u6253\u4e71\u77e9\u9635\u7684\u5217\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\u77e9\u9635\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">matrix = np.array([[1, 2, 3], <\/p>\n<p>                   [4, 5, 6], <\/p>\n<p>                   [7, 8, 9]])<\/p>\n<p>print(&quot;Original Matrix:&quot;)<\/p>\n<p>print(matrix)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u6253\u4e71\u77e9\u9635\u7684\u5217<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u6253\u4e71\u77e9\u9635\u7684\u5217\uff0c\u6211\u4eec\u9700\u8981\u5bf9\u77e9\u9635\u8fdb\u884c\u8f6c\u7f6e\uff0c\u7136\u540e\u4f7f\u7528<code>numpy.random.shuffle<\/code>\u51fd\u6570\u5bf9\u8f6c\u7f6e\u540e\u7684\u77e9\u9635\u7684\u884c\u8fdb\u884c\u6253\u4e71\uff0c\u6700\u540e\u518d\u5c06\u77e9\u9635\u8f6c\u7f6e\u56de\u6765\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u5b9e\u73b0\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u8f6c\u7f6e\u77e9\u9635<\/p>\n<p>transposed_matrix = matrix.T<\/p>\n<h2><strong>\u6253\u4e71\u8f6c\u7f6e\u77e9\u9635\u7684\u884c<\/strong><\/h2>\n<p>np.random.shuffle(transposed_matrix)<\/p>\n<h2><strong>\u518d\u6b21\u8f6c\u7f6e\u77e9\u9635<\/strong><\/h2>\n<p>shuffled_matrix = transposed_matrix.T<\/p>\n<p>print(&quot;Shuffled Matrix:&quot;)<\/p>\n<p>print(shuffled_matrix)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5177\u4f53\u5b9e\u73b0<\/h3>\n<\/p>\n<p><p>\u4e0b\u9762\u662f\u5b8c\u6574\u7684\u4ee3\u7801\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u793a\u4f8b\u77e9\u9635<\/strong><\/h2>\n<p>matrix = np.array([[1, 2, 3], <\/p>\n<p>                   [4, 5, 6], <\/p>\n<p>                   [7, 8, 9]])<\/p>\n<p>print(&quot;Original Matrix:&quot;)<\/p>\n<p>print(matrix)<\/p>\n<h2><strong>\u8f6c\u7f6e\u77e9\u9635<\/strong><\/h2>\n<p>transposed_matrix = matrix.T<\/p>\n<h2><strong>\u6253\u4e71\u8f6c\u7f6e\u77e9\u9635\u7684\u884c<\/strong><\/h2>\n<p>np.random.shuffle(transposed_matrix)<\/p>\n<h2><strong>\u518d\u6b21\u8f6c\u7f6e\u77e9\u9635<\/strong><\/h2>\n<p>shuffled_matrix = transposed_matrix.T<\/p>\n<p>print(&quot;Shuffled Matrix:&quot;)<\/p>\n<p>print(shuffled_matrix)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u8be6\u7ec6\u89e3\u91ca<\/h3>\n<\/p>\n<ol>\n<li><strong>\u8f6c\u7f6e\u77e9\u9635<\/strong>\uff1a\u901a\u8fc7<code>matrix.T<\/code>\u5c06\u539f\u59cb\u77e9\u9635\u8fdb\u884c\u8f6c\u7f6e\u3002\u8f6c\u7f6e\u64cd\u4f5c\u5c06\u77e9\u9635\u7684\u884c\u53d8\u4e3a\u5217\uff0c\u5217\u53d8\u4e3a\u884c\u3002<\/li>\n<li><strong>\u6253\u4e71\u8f6c\u7f6e\u77e9\u9635\u7684\u884c<\/strong>\uff1a\u4f7f\u7528<code>np.random.shuffle(transposed_matrix)<\/code>\u5bf9\u8f6c\u7f6e\u540e\u7684\u77e9\u9635\u7684\u884c\u8fdb\u884c\u968f\u673a\u6253\u4e71\u3002<code>numpy.random.shuffle<\/code>\u51fd\u6570\u4f1a\u5bf9\u6570\u7ec4\u7684\u7b2c\u4e00\u7ef4\u5ea6\uff08\u8fd9\u91cc\u662f\u884c\uff09\u8fdb\u884c\u6253\u4e71\u3002<\/li>\n<li><strong>\u518d\u6b21\u8f6c\u7f6e\u77e9\u9635<\/strong>\uff1a\u901a\u8fc7<code>transposed_matrix.T<\/code>\u5c06\u6253\u4e71\u540e\u7684\u77e9\u9635\u518d\u6b21\u8f6c\u7f6e\uff0c\u6062\u590d\u5230\u539f\u6765\u7684\u884c\u5217\u7ed3\u6784\u3002<\/li>\n<\/ol>\n<p><h3>\u516d\u3001\u9a8c\u8bc1\u7ed3\u679c<\/h3>\n<\/p>\n<p><p>\u8fd0\u884c\u4e0a\u8ff0\u4ee3\u7801\u53ef\u4ee5\u5f97\u5230\u4ee5\u4e0b\u8f93\u51fa\uff1a<\/p>\n<\/p>\n<p><pre><code>Original Matrix:<\/p>\n<p>[[1 2 3]<\/p>\n<p> [4 5 6]<\/p>\n<p> [7 8 9]]<\/p>\n<p>Shuffled Matrix:<\/p>\n<p>[[2 3 1]<\/p>\n<p> [5 6 4]<\/p>\n<p> [8 9 7]]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u53ef\u4ee5\u770b\u5230\uff0c\u77e9\u9635\u7684\u5217\u5df2\u7ecf\u88ab\u6253\u4e71\uff0c\u4f46\u6bcf\u5217\u5143\u7d20\u7684\u987a\u5e8f\u4fdd\u6301\u4e0d\u53d8\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p><strong>\u4f7f\u7528NumPy\u5e93\u53ef\u4ee5\u65b9\u4fbf\u5730\u5c06\u77e9\u9635\u6309\u5217\u6253\u4e71<\/strong>\u3002\u5177\u4f53\u6b65\u9aa4\u5305\u62ec\uff1a\u8f6c\u7f6e\u77e9\u9635\u3001\u6253\u4e71\u8f6c\u7f6e\u540e\u7684\u77e9\u9635\u7684\u884c\u3001\u518d\u6b21\u8f6c\u7f6e\u77e9\u9635\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u5feb\u901f\u5b9e\u73b0\u77e9\u9635\u5217\u7684\u968f\u673a\u6392\u5217\u3002\u4f7f\u7528NumPy\u5e93\u4e0d\u4ec5\u4ee3\u7801\u7b80\u6d01\uff0c\u800c\u4e14\u6267\u884c\u6548\u7387\u9ad8\uff0c\u9002\u7528\u4e8e\u5927\u89c4\u6a21\u6570\u636e\u5904\u7406\u3002<\/p>\n<\/p>\n<p><h3>\u516b\u3001\u5176\u4ed6\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u9664\u4e86\u4f7f\u7528NumPy\u5e93\uff0c\u8fd8\u53ef\u4ee5\u901a\u8fc7\u5176\u4ed6\u65b9\u6cd5\u5b9e\u73b0\u77e9\u9635\u5217\u7684\u6253\u4e71\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u66ff\u4ee3\u65b9\u6cd5\u7684\u7b80\u8981\u8bf4\u660e\uff1a<\/p>\n<\/p>\n<p><h4>1\u3001\u4f7f\u7528Pandas\u5e93<\/h4>\n<\/p>\n<p><p>Pandas\u5e93\u63d0\u4f9b\u4e86\u8bb8\u591a\u65b9\u4fbf\u7684\u6570\u636e\u64cd\u4f5c\u51fd\u6570\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528Pandas\u5e93\u5b9e\u73b0\u77e9\u9635\u5217\u7684\u6253\u4e71\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u793a\u4f8bDataFrame<\/strong><\/h2>\n<p>df = pd.DataFrame([[1, 2, 3], <\/p>\n<p>                   [4, 5, 6], <\/p>\n<p>                   [7, 8, 9]])<\/p>\n<p>print(&quot;Original DataFrame:&quot;)<\/p>\n<p>print(df)<\/p>\n<h2><strong>\u6253\u4e71DataFrame\u7684\u5217<\/strong><\/h2>\n<p>shuffled_df = df.sample(frac=1, axis=1)<\/p>\n<p>print(&quot;Shuffled DataFrame:&quot;)<\/p>\n<p>print(shuffled_df)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u624b\u52a8\u5b9e\u73b0\u5217\u6253\u4e71<\/h4>\n<\/p>\n<p><p>\u6211\u4eec\u4e5f\u53ef\u4ee5\u624b\u52a8\u5b9e\u73b0\u77e9\u9635\u5217\u7684\u6253\u4e71\uff0c\u901a\u8fc7\u968f\u673a\u751f\u6210\u5217\u7d22\u5f15\u5e76\u91cd\u65b0\u6392\u5217\u77e9\u9635\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u793a\u4f8b\u77e9\u9635<\/strong><\/h2>\n<p>matrix = np.array([[1, 2, 3], <\/p>\n<p>                   [4, 5, 6], <\/p>\n<p>                   [7, 8, 9]])<\/p>\n<p>print(&quot;Original Matrix:&quot;)<\/p>\n<p>print(matrix)<\/p>\n<h2><strong>\u751f\u6210\u968f\u673a\u5217\u7d22\u5f15<\/strong><\/h2>\n<p>col_indices = np.random.permutation(matrix.shape[1])<\/p>\n<h2><strong>\u91cd\u65b0\u6392\u5217\u77e9\u9635\u7684\u5217<\/strong><\/h2>\n<p>shuffled_matrix = matrix[:, col_indices]<\/p>\n<p>print(&quot;Shuffled Matrix:&quot;)<\/p>\n<p>print(shuffled_matrix)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e5d\u3001\u5e94\u7528\u573a\u666f<\/h3>\n<\/p>\n<p><p>\u77e9\u9635\u5217\u7684\u6253\u4e71\u5728\u8bb8\u591a\u5e94\u7528\u573a\u666f\u4e2d\u975e\u5e38\u6709\u7528\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u6570\u636e\u9884\u5904\u7406<\/strong>\uff1a\u5728<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u548c\u6570\u636e\u6316\u6398\u4e2d\uff0c\u6570\u636e\u9884\u5904\u7406\u662f\u4e00\u4e2a\u5173\u952e\u6b65\u9aa4\u3002\u6253\u4e71\u6570\u636e\u96c6\u7684\u5217\u53ef\u4ee5\u5e2e\u52a9\u907f\u514d\u6570\u636e\u6cc4\u9732\uff0c\u786e\u4fdd\u6a21\u578b\u7684\u8bad\u7ec3\u548c\u6d4b\u8bd5\u6570\u636e\u7684\u968f\u673a\u6027\u3002<\/li>\n<li><strong>\u7279\u5f81\u5de5\u7a0b<\/strong>\uff1a\u5728\u7279\u5f81\u5de5\u7a0b\u4e2d\uff0c\u6253\u4e71\u7279\u5f81\u5217\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u8bc4\u4f30\u7279\u5f81\u7684\u91cd\u8981\u6027\uff0c\u8bc6\u522b\u4e0e\u76ee\u6807\u53d8\u91cf\u76f8\u5173\u7684\u7279\u5f81\u3002<\/li>\n<li><strong>\u6570\u636e\u589e\u5f3a<\/strong>\uff1a\u5728\u8ba1\u7b97\u673a\u89c6\u89c9\u548c\u81ea\u7136\u8bed\u8a00\u5904\u7406\u7b49\u9886\u57df\uff0c\u6570\u636e\u589e\u5f3a\u662f\u63d0\u9ad8\u6a21\u578b\u6cdb\u5316\u80fd\u529b\u7684\u4e00\u79cd\u65b9\u6cd5\u3002\u901a\u8fc7\u6253\u4e71\u7279\u5f81\u5217\uff0c\u53ef\u4ee5\u751f\u6210\u66f4\u591a\u7684\u8bad\u7ec3\u6837\u672c\uff0c\u589e\u5f3a\u6a21\u578b\u7684\u9c81\u68d2\u6027\u3002<\/li>\n<\/ol>\n<p><h3>\u5341\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528NumPy\u5e93\u5c06\u77e9\u9635\u6309\u5217\u6253\u4e71\u7684\u65b9\u6cd5\u3002\u901a\u8fc7\u8f6c\u7f6e\u77e9\u9635\u3001\u6253\u4e71\u8f6c\u7f6e\u540e\u7684\u77e9\u9635\u7684\u884c\u3001\u518d\u6b21\u8f6c\u7f6e\u77e9\u9635\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u8fd9\u4e00\u64cd\u4f5c\u3002\u6211\u4eec\u8fd8\u7b80\u8981\u4ecb\u7ecd\u4e86\u4f7f\u7528Pandas\u5e93\u548c\u624b\u52a8\u5b9e\u73b0\u5217\u6253\u4e71\u7684\u66ff\u4ee3\u65b9\u6cd5\u3002\u5e0c\u671b\u901a\u8fc7\u672c\u6587\u7684\u8bb2\u89e3\uff0c\u8bfb\u8005\u80fd\u591f\u638c\u63e1\u77e9\u9635\u5217\u6253\u4e71\u7684\u6280\u5de7\uff0c\u5e76\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u7075\u6d3b\u8fd0\u7528\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u4f7f\u7528Python\u6253\u4e71\u77e9\u9635\u7684\u5217\u987a\u5e8f\uff1f<\/strong><br \/>\u8981\u6253\u4e71\u77e9\u9635\u7684\u5217\u987a\u5e8f\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528NumPy\u5e93\u4e2d\u7684<code>numpy.random.permutation()<\/code>\u51fd\u6570\u3002\u9996\u5148\uff0c\u751f\u6210\u4e00\u4e2a\u968f\u673a\u6392\u5217\u7684\u7d22\u5f15\u6570\u7ec4\uff0c\u7136\u540e\u5229\u7528\u8fd9\u4e2a\u7d22\u5f15\u6570\u7ec4\u5bf9\u77e9\u9635\u7684\u5217\u8fdb\u884c\u91cd\u65b0\u6392\u5217\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import numpy as np\n\n# \u521b\u5efa\u4e00\u4e2a\u793a\u4f8b\u77e9\u9635\nmatrix = np.array([[1, 2, 3],\n                   [4, 5, 6],\n                   [7, 8, 9]])\n\n# \u6253\u4e71\u5217\u987a\u5e8f\nshuffled_matrix = matrix[:, np.random.permutation(matrix.shape[1])]\n\nprint(shuffled_matrix)\n<\/code><\/pre>\n<p>\u6b64\u4ee3\u7801\u5c06\u968f\u673a\u6253\u4e71\u77e9\u9635\u7684\u5217\uff0c\u60a8\u53ef\u4ee5\u591a\u6b21\u8fd0\u884c\u4ee5\u83b7\u5f97\u4e0d\u540c\u7684\u7ed3\u679c\u3002<\/p>\n<p><strong>\u4f7f\u7528\u5176\u4ed6\u5e93\u662f\u5426\u4e5f\u53ef\u4ee5\u6253\u4e71\u77e9\u9635\u7684\u5217\uff1f<\/strong><br \/>\u9664\u4e86NumPy\uff0c\u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528Pandas\u5e93\u6765\u6253\u4e71\u77e9\u9635\u7684\u5217\u3002\u9996\u5148\u5c06\u77e9\u9635\u8f6c\u6362\u4e3aDataFrame\u5bf9\u8c61\uff0c\u7136\u540e\u4f7f\u7528<code>sample()<\/code>\u65b9\u6cd5\u8fdb\u884c\u5217\u7684\u968f\u673a\u62bd\u6837\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import pandas as pd\n\n# \u521b\u5efa\u4e00\u4e2a\u793a\u4f8b\u77e9\u9635\nmatrix = pd.DataFrame([[1, 2, 3],\n                       [4, 5, 6],\n                       [7, 8, 9]])\n\n# \u6253\u4e71\u5217\u987a\u5e8f\nshuffled_matrix = matrix.sample(frac=1, axis=1).reset_index(drop=True)\n\nprint(shuffled_matrix)\n<\/code><\/pre>\n<p>\u8fd9\u79cd\u65b9\u6cd5\u540c\u6837\u80fd\u591f\u6709\u6548\u5730\u6253\u4e71\u5217\u7684\u987a\u5e8f\u3002<\/p>\n<p><strong>\u6253\u4e71\u77e9\u9635\u5217\u65f6\u4f1a\u5f71\u54cd\u6570\u636e\u7684\u5b8c\u6574\u6027\u5417\uff1f<\/strong><br \/>\u6253\u4e71\u77e9\u9635\u7684\u5217\u987a\u5e8f\u5e76\u4e0d\u4f1a\u6539\u53d8\u5217\u5185\u90e8\u6570\u636e\u7684\u5b8c\u6574\u6027\u3002\u6bcf\u5217\u7684\u6570\u636e\u4ecd\u7136\u4fdd\u6301\u4e0d\u53d8\uff0c\u53ea\u662f\u5217\u7684\u6392\u5217\u987a\u5e8f\u53d1\u751f\u4e86\u53d8\u5316\u3002\u56e0\u6b64\uff0c\u8fd9\u79cd\u64cd\u4f5c\u9002\u5408\u5728\u9700\u8981\u5bf9\u6570\u636e\u8fdb\u884c\u968f\u673a\u5904\u7406\u6216\u51c6\u5907\u6570\u636e\u96c6\u65f6\u4f7f\u7528\uff0c\u4f46\u5728\u6570\u636e\u5206\u6790\u65f6\u9700\u8981\u6ce8\u610f\u6253\u4e71\u53ef\u80fd\u5bf9\u7ed3\u679c\u89e3\u91ca\u7684\u5f71\u54cd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u5c06\u77e9\u9635\u6309\u5217\u6253\u4e71\u7684\u65b9\u6cd5\u6709\u51e0\u79cd\uff1a\u4f7f\u7528NumPy\u5e93\u3001\u4f7f\u7528Pandas\u5e93\u3001\u624b\u52a8\u5b9e\u73b0\u5217\u6253\u4e71\u3002 \u5728\u8fd9\u91cc\uff0c\u6211 [&hellip;]","protected":false},"author":3,"featured_media":1061422,"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\/1061408"}],"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=1061408"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1061408\/revisions"}],"predecessor-version":[{"id":1061427,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1061408\/revisions\/1061427"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1061422"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1061408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1061408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1061408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}