{"id":1006114,"date":"2024-12-27T10:41:31","date_gmt":"2024-12-27T02:41:31","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1006114.html"},"modified":"2024-12-27T10:41:33","modified_gmt":"2024-12-27T02:41:33","slug":"%e5%a6%82%e4%bd%95%e7%94%a8python%e8%a1%a8%e8%be%be%e5%ad%a3%e5%ba%a6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1006114.html","title":{"rendered":"\u5982\u4f55\u7528python\u8868\u8fbe\u5b63\u5ea6"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25082350\/0b2cb88a-6d1c-41a3-8b02-2de9ed4d5885.webp\" alt=\"\u5982\u4f55\u7528python\u8868\u8fbe\u5b63\u5ea6\" \/><\/p>\n<p><p> <strong>\u7528Python\u8868\u8fbe\u5b63\u5ea6\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528\u65e5\u671f\u65f6\u95f4\u5e93\u3001\u6761\u4ef6\u8bed\u53e5\u3001\u5b57\u5178\u6620\u5c04\u3002\u5728\u5206\u6790\u65e5\u671f\u6570\u636e\u65f6\uff0c\u4f7f\u7528Python\u7684datetime\u6a21\u5757\u53ef\u4ee5\u8f7b\u677e\u5730\u63d0\u53d6\u6708\u4efd\u4fe1\u606f\uff0c\u901a\u8fc7\u6761\u4ef6\u8bed\u53e5\u6216\u5b57\u5178\u5c06\u6708\u4efd\u6620\u5c04\u5230\u76f8\u5e94\u7684\u5b63\u5ea6\u3002\u5728\u6570\u636e\u5206\u6790\u548c\u62a5\u544a\u751f\u6210\u4e2d\uff0c\u5b63\u5ea6\u4fe1\u606f\u6709\u52a9\u4e8e\u8bc6\u522b\u5b63\u8282\u6027\u8d8b\u52bf\u548c\u5468\u671f\u6027\u53d8\u5316\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u6570\u636e\u5904\u7406\u548c\u5206\u6790\u8fc7\u7a0b\u4e2d\uff0c\u5e38\u5e38\u9700\u8981\u5c06\u65e5\u671f\u5212\u5206\u4e3a\u5b63\u5ea6\uff0c\u4ee5\u4fbf\u66f4\u597d\u5730\u7406\u89e3\u548c\u5206\u6790\u5b63\u5ea6\u6027\u8d8b\u52bf\u3002Python\u4f5c\u4e3a\u4e00\u79cd\u5f3a\u5927\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u63d0\u4f9b\u4e86\u8bb8\u591a\u65b9\u6cd5\u6765\u5b9e\u73b0\u8fd9\u4e00\u76ee\u6807\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u63a2\u8ba8\u5982\u4f55\u7528Python\u8868\u8fbe\u5b63\u5ea6\uff0c\u5305\u62ec\u4f7f\u7528datetime\u5e93\u63d0\u53d6\u6708\u4efd\u4fe1\u606f\uff0c\u901a\u8fc7\u6761\u4ef6\u8bed\u53e5\u5224\u65ad\u5b63\u5ea6\uff0c\u4ee5\u53ca\u4f7f\u7528\u5b57\u5178\u8fdb\u884c\u6708\u4efd\u5230\u5b63\u5ea6\u7684\u6620\u5c04\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528DATETIME\u5e93\u548c\u6761\u4ef6\u8bed\u53e5<\/p>\n<\/p>\n<p><p>datetime\u6a21\u5757\u662fPython\u5185\u7f6e\u7684\u4e00\u4e2a\u5904\u7406\u65e5\u671f\u548c\u65f6\u95f4\u7684\u6a21\u5757\uff0c\u5b83\u63d0\u4f9b\u4e86\u5f88\u591a\u6709\u7528\u7684\u51fd\u6570\u6765\u5904\u7406\u65e5\u671f\u548c\u65f6\u95f4\u3002\u5728\u5904\u7406\u5b63\u5ea6\u65f6\uff0c\u901a\u5e38\u6211\u4eec\u9996\u5148\u9700\u8981\u83b7\u53d6\u65e5\u671f\u7684\u6708\u4efd\uff0c\u7136\u540e\u6839\u636e\u6708\u4efd\u6765\u5224\u65ad\u6240\u5c5e\u7684\u5b63\u5ea6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import datetime<\/p>\n<p>def get_quarter(date):<\/p>\n<p>    month = date.month<\/p>\n<p>    if month in [1, 2, 3]:<\/p>\n<p>        return &quot;Q1&quot;<\/p>\n<p>    elif month in [4, 5, 6]:<\/p>\n<p>        return &quot;Q2&quot;<\/p>\n<p>    elif month in [7, 8, 9]:<\/p>\n<p>        return &quot;Q3&quot;<\/p>\n<p>    else:<\/p>\n<p>        return &quot;Q4&quot;<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>date = datetime.datetime(2023, 5, 17)<\/p>\n<p>quarter = get_quarter(date)<\/p>\n<p>print(f&quot;The quarter for the date {date.date()} is {quarter}.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4ee3\u7801\u7247\u6bb5\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u4e86datetime\u5e93\u6765\u521b\u5efa\u4e00\u4e2a\u65e5\u671f\u5bf9\u8c61\uff0c\u7136\u540e\u901a\u8fc7\u6761\u4ef6\u8bed\u53e5\u5224\u65ad\u8be5\u65e5\u671f\u6240\u5c5e\u7684\u5b63\u5ea6\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u7075\u6d3b\u5730\u5904\u7406\u5404\u79cd\u65e5\u671f\u683c\u5f0f\uff0c\u5e76\u6839\u636e\u5b9e\u9645\u9700\u6c42\u8c03\u6574\u5b63\u5ea6\u7684\u5b9a\u4e49\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528\u5b57\u5178\u8fdb\u884c\u6708\u4efd\u5230\u5b63\u5ea6\u6620\u5c04<\/p>\n<\/p>\n<p><p>\u53e6\u4e00\u79cd\u5b9e\u73b0\u65b9\u6cd5\u662f\u4f7f\u7528\u5b57\u5178\u6765\u6620\u5c04\u6708\u4efd\u5230\u5b63\u5ea6\u3002\u8fd9\u79cd\u65b9\u6cd5\u7b80\u6d01\u800c\u9ad8\u6548\uff0c\u5c24\u5176\u662f\u5728\u5904\u7406\u5927\u91cf\u65e5\u671f\u6570\u636e\u65f6\uff0c\u80fd\u591f\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u6267\u884c\u6548\u7387\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def get_quarter_with_dict(month):<\/p>\n<p>    month_to_quarter = {<\/p>\n<p>        1: &quot;Q1&quot;, 2: &quot;Q1&quot;, 3: &quot;Q1&quot;,<\/p>\n<p>        4: &quot;Q2&quot;, 5: &quot;Q2&quot;, 6: &quot;Q2&quot;,<\/p>\n<p>        7: &quot;Q3&quot;, 8: &quot;Q3&quot;, 9: &quot;Q3&quot;,<\/p>\n<p>        10: &quot;Q4&quot;, 11: &quot;Q4&quot;, 12: &quot;Q4&quot;<\/p>\n<p>    }<\/p>\n<p>    return month_to_quarter.get(month, &quot;Invalid month&quot;)<\/p>\n<h2><strong>\u793a\u4f8b<\/strong><\/h2>\n<p>month = 11<\/p>\n<p>quarter = get_quarter_with_dict(month)<\/p>\n<p>print(f&quot;The quarter for the month {month} is {quarter}.&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f7f\u7528\u5b57\u5178\u8fdb\u884c\u6620\u5c04\u7684\u4f18\u70b9\u5728\u4e8e\u4ee3\u7801\u7b80\u6d01\u660e\u4e86\uff0c\u5e76\u4e14\u6613\u4e8e\u7ef4\u62a4\u3002\u5f53\u9700\u8981\u8c03\u6574\u5b63\u5ea6\u5212\u5206\u89c4\u5219\u65f6\uff0c\u53ea\u9700\u4fee\u6539\u5b57\u5178\u4e2d\u7684\u6620\u5c04\u5173\u7cfb\u5373\u53ef\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u5904\u7406\u65e5\u671f\u6570\u7ec4\u6216\u6570\u636e\u6846<\/p>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u6570\u636e\u5206\u6790\u4e2d\uff0c\u6211\u4eec\u5e38\u5e38\u9700\u8981\u5904\u7406\u65e5\u671f\u6570\u7ec4\u6216\u6570\u636e\u6846\u3002Python\u7684pandas\u5e93\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u6570\u636e\u5904\u7406\u80fd\u529b\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5c06\u65e5\u671f\u8f6c\u6362\u4e3a\u5b63\u5ea6\u4fe1\u606f\uff0c\u5e76\u8fdb\u884c\u6570\u636e\u805a\u5408\u548c\u5206\u6790\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<h2><strong>\u521b\u5efa\u65e5\u671f\u6570\u636e<\/strong><\/h2>\n<p>dates = pd.date_range(&quot;2023-01-01&quot;, &quot;2023-12-31&quot;, freq=&#39;M&#39;)<\/p>\n<p>df = pd.DataFrame({&#39;Date&#39;: dates})<\/p>\n<h2><strong>\u6dfb\u52a0\u5b63\u5ea6\u4fe1\u606f<\/strong><\/h2>\n<p>df[&#39;Quarter&#39;] = df[&#39;Date&#39;].dt.to_period(&#39;Q&#39;)<\/p>\n<p>print(df.head())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528pandas\u5e93\u521b\u5efa\u4e86\u4e00\u4e2a\u5305\u542b\u6bcf\u4e2a\u6708\u6700\u540e\u4e00\u5929\u7684\u65e5\u671f\u6570\u636e\u6846\uff0c\u5e76\u901a\u8fc7<code>to_period(&#39;Q&#39;)<\/code>\u65b9\u6cd5\u4e3a\u6bcf\u4e2a\u65e5\u671f\u6dfb\u52a0\u5b63\u5ea6\u4fe1\u606f\u3002\u8fd9\u79cd\u65b9\u6cd5\u5728\u5904\u7406\u5927\u89c4\u6a21\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u65f6\u5c24\u5176\u9ad8\u6548\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u5728\u6570\u636e\u5206\u6790\u548c\u62a5\u544a\u751f\u6210\u4e2d\u7684\u5e94\u7528<\/p>\n<\/p>\n<p><p>\u4e86\u89e3\u5982\u4f55\u7528Python\u8868\u8fbe\u5b63\u5ea6\u5728\u6570\u636e\u5206\u6790\u548c\u62a5\u544a\u751f\u6210\u4e2d\u5177\u6709\u91cd\u8981\u610f\u4e49\u3002\u5b63\u5ea6\u4fe1\u606f\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u8bc6\u522b\u5b63\u8282\u6027\u8d8b\u52bf\u548c\u5468\u671f\u6027\u53d8\u5316\uff0c\u4ece\u800c\u4e3a\u51b3\u7b56\u63d0\u4f9b\u6709\u529b\u652f\u6301\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b63\u8282\u6027\u8d8b\u52bf\u5206\u6790<\/strong>\uff1a\u901a\u8fc7\u5c06\u6570\u636e\u6309\u5b63\u5ea6\u805a\u5408\uff0c\u6211\u4eec\u53ef\u4ee5\u8bc6\u522b\u51fa\u6570\u636e\u4e2d\u7684\u5b63\u8282\u6027\u6ce2\u52a8\u3002\u4f8b\u5982\uff0c\u96f6\u552e\u4f01\u4e1a\u53ef\u4ee5\u5206\u6790\u4e0d\u540c\u5b63\u5ea6\u7684\u9500\u552e\u60c5\u51b5\uff0c\u53d1\u73b0\u6de1\u65fa\u5b63\uff0c\u5e76\u636e\u6b64\u8c03\u6574\u5e93\u5b58\u548c\u4fc3\u9500\u7b56\u7565\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5468\u671f\u6027\u53d8\u5316\u68c0\u6d4b<\/strong>\uff1a\u5b63\u5ea6\u6570\u636e\u6709\u52a9\u4e8e\u8bc6\u522b\u957f\u671f\u7684\u5468\u671f\u6027\u53d8\u5316\u3002\u4f8b\u5982\uff0c\u91d1\u878d\u5206\u6790\u5e08\u53ef\u4ee5\u901a\u8fc7\u5b63\u5ea6\u8d22\u52a1\u62a5\u8868\u6570\u636e\uff0c\u8bc4\u4f30\u4f01\u4e1a\u7684\u957f\u671f\u53d1\u5c55\u8d8b\u52bf\u548c\u8d22\u52a1\u5065\u5eb7\u72b6\u51b5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u62a5\u544a\u751f\u6210<\/strong>\uff1a\u5728\u751f\u6210\u5b63\u5ea6\u62a5\u544a\u65f6\uff0c\u81ea\u52a8\u5316\u5904\u7406\u5b63\u5ea6\u4fe1\u606f\u53ef\u4ee5\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\uff0c\u51cf\u5c11\u4eba\u4e3a\u9519\u8bef\u3002Python\u63d0\u4f9b\u7684\u591a\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u5feb\u901f\u51c6\u786e\u5730\u751f\u6210\u5b63\u5ea6\u62a5\u544a\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u603b\u7ed3\u4e0e\u6700\u4f73\u5b9e\u8df5<\/p>\n<\/p>\n<p><p>\u7528Python\u8868\u8fbe\u5b63\u5ea6\u7684\u65b9\u6cd5\u591a\u79cd\u591a\u6837\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u5e94\u7528\u573a\u666f\u548c\u6570\u636e\u89c4\u6a21\u3002\u5728\u5c0f\u89c4\u6a21\u6570\u636e\u5904\u7406\u65f6\uff0c\u6761\u4ef6\u8bed\u53e5\u548c\u5b57\u5178\u6620\u5c04\u65b9\u6cd5\u7b80\u5355\u9ad8\u6548\uff1b\u800c\u5728\u5927\u89c4\u6a21\u6570\u636e\u5206\u6790\u4e2d\uff0cpandas\u5e93\u63d0\u4f9b\u7684\u529f\u80fd\u5219\u66f4\u52a0\u7075\u6d3b\u548c\u5f3a\u5927\u3002<\/p>\n<\/p>\n<p><p>\u5728\u4f7f\u7528\u8fc7\u7a0b\u4e2d\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u6700\u4f73\u5b9e\u8df5\u5efa\u8bae\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u660e\u786e\u5b63\u5ea6\u5b9a\u4e49<\/strong>\uff1a\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u4e0d\u540c\u7684\u9886\u57df\u548c\u7ec4\u7ec7\u53ef\u80fd\u5bf9\u5b63\u5ea6\u6709\u4e0d\u540c\u7684\u5b9a\u4e49\u3002\u5728\u5f00\u59cb\u7f16\u7801\u4e4b\u524d\uff0c\u786e\u4fdd\u660e\u786e\u5b63\u5ea6\u7684\u5b9a\u4e49\u548c\u5212\u5206\u89c4\u5219\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u51fd\u6570\u5c01\u88c5<\/strong>\uff1a\u5c06\u5b63\u5ea6\u5224\u65ad\u903b\u8f91\u5c01\u88c5\u4e3a\u51fd\u6570\uff0c\u63d0\u5347\u4ee3\u7801\u7684\u53ef\u91cd\u7528\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7ed3\u5408pandas\u8fdb\u884c\u5927\u6570\u636e\u5206\u6790<\/strong>\uff1a\u5728\u5904\u7406\u5927\u89c4\u6a21\u6570\u636e\u65f6\uff0c\u5229\u7528pandas\u7684\u5f3a\u5927\u529f\u80fd\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u6570\u636e\u5904\u7406\u7684\u6548\u7387\u548c\u51c6\u786e\u6027\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><p>\u901a\u8fc7\u672c\u6587\u7684\u8be6\u7ec6\u4ecb\u7ecd\uff0c\u76f8\u4fe1\u4f60\u5df2\u7ecf\u638c\u63e1\u4e86\u7528Python\u8868\u8fbe\u5b63\u5ea6\u7684\u591a\u79cd\u65b9\u6cd5\uff0c\u5e76\u80fd\u5728\u5b9e\u9645\u6570\u636e\u5206\u6790\u4e2d\u7075\u6d3b\u5e94\u7528\u8fd9\u4e9b\u6280\u672f\u3002\u5e0c\u671b\u8fd9\u4e9b\u5185\u5bb9\u5bf9\u4f60\u7684\u5de5\u4f5c\u548c\u5b66\u4e60\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u8ba1\u7b97\u7279\u5b9a\u65e5\u671f\u7684\u5b63\u5ea6\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u5229\u7528<code>pandas<\/code>\u5e93\u6765\u5feb\u901f\u8ba1\u7b97\u7279\u5b9a\u65e5\u671f\u7684\u5b63\u5ea6\u3002\u9996\u5148\uff0c\u786e\u4fdd\u5b89\u88c5\u4e86<code>pandas<\/code>\u5e93\u3002\u7136\u540e\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>pd.to_datetime()<\/code>\u5c06\u65e5\u671f\u8f6c\u6362\u4e3a\u65e5\u671f\u65f6\u95f4\u5bf9\u8c61\uff0c\u63a5\u7740\u4f7f\u7528<code>.quarter<\/code>\u5c5e\u6027\u83b7\u53d6\u5b63\u5ea6\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">import pandas as pd\n\ndate = pd.to_datetime(&#39;2023-05-15&#39;)\nquarter = date.quarter\nprint(f&#39;The quarter for the date is: {quarter}&#39;)\n<\/code><\/pre>\n<p><strong>Python\u4e2d\u5982\u4f55\u5c06\u4e00\u7ec4\u65e5\u671f\u8f6c\u6362\u4e3a\u5b63\u5ea6\uff1f<\/strong><br \/>\u5982\u679c\u60a8\u6709\u4e00\u7ec4\u65e5\u671f\u5e76\u5e0c\u671b\u5c06\u5b83\u4eec\u8f6c\u6362\u4e3a\u5b63\u5ea6\uff0c\u53ef\u4ee5\u5c06\u5b83\u4eec\u653e\u5165\u4e00\u4e2a<code>pandas<\/code>\u7684<code>Series<\/code>\u4e2d\uff0c\u5e76\u4f7f\u7528<code>dt.quarter<\/code>\u5c5e\u6027\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code class=\"language-python\">import pandas as pd\n\ndates = pd.Series(pd.to_datetime([&#39;2023-01-10&#39;, &#39;2023-04-15&#39;, &#39;2023-07-20&#39;, &#39;2023-10-05&#39;]))\nquarters = dates.dt.quarter\nprint(quarters)\n<\/code><\/pre>\n<p><strong>\u5728Python\u4e2d\u5982\u4f55\u751f\u6210\u7279\u5b9a\u5e74\u4efd\u7684\u5b63\u5ea6\u6570\u636e\uff1f<\/strong><br \/>\u60a8\u53ef\u4ee5\u4f7f\u7528<code>numpy<\/code>\u5e93\u751f\u6210\u7279\u5b9a\u5e74\u4efd\u7684\u5b63\u5ea6\u6570\u636e\u3002\u9996\u5148\u751f\u6210\u65e5\u671f\u8303\u56f4\uff0c\u7136\u540e\u63d0\u53d6\u51fa\u5b63\u5ea6\u4fe1\u606f\u3002\u4f8b\u5982\uff0c\u751f\u62102023\u5e74\u6bcf\u4e2a\u6708\u7684\u65e5\u671f\u5e76\u63d0\u53d6\u5b63\u5ea6\uff1a<\/p>\n<pre><code class=\"language-python\">import pandas as pd\n\ndate_range = pd.date_range(start=&#39;2023-01-01&#39;, end=&#39;2023-12-31&#39;, freq=&#39;M&#39;)\nquarters = date_range.to_series().dt.quarter\nprint(quarters)\n<\/code><\/pre>\n<p>\u901a\u8fc7\u8fd9\u4e9b\u793a\u4f8b\uff0c\u60a8\u53ef\u4ee5\u8f7b\u677e\u5730\u5728Python\u4e2d\u5904\u7406\u5b63\u5ea6\u76f8\u5173\u7684\u4efb\u52a1\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u7528Python\u8868\u8fbe\u5b63\u5ea6\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528\u65e5\u671f\u65f6\u95f4\u5e93\u3001\u6761\u4ef6\u8bed\u53e5\u3001\u5b57\u5178\u6620\u5c04\u3002\u5728\u5206\u6790\u65e5\u671f\u6570\u636e\u65f6\uff0c\u4f7f\u7528Python\u7684da [&hellip;]","protected":false},"author":3,"featured_media":1006125,"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\/1006114"}],"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=1006114"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1006114\/revisions"}],"predecessor-version":[{"id":1006128,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1006114\/revisions\/1006128"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1006125"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1006114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1006114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1006114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}