{"id":1046151,"date":"2024-12-31T13:30:39","date_gmt":"2024-12-31T05:30:39","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1046151.html"},"modified":"2024-12-31T13:30:49","modified_gmt":"2024-12-31T05:30:49","slug":"python%e5%a6%82%e4%bd%95%e6%8a%8a%e5%88%97%e8%a1%a8%e5%ad%98%e6%88%90excel%e8%a1%a8%e6%a0%bc","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1046151.html","title":{"rendered":"python\u5982\u4f55\u628a\u5217\u8868\u5b58\u6210excel\u8868\u683c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/5529359f-9fd6-42b2-8a17-9d11c005a514.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u5982\u4f55\u628a\u5217\u8868\u5b58\u6210excel\u8868\u683c\" \/><\/p>\n<p><p> <strong>Python\u5c06\u5217\u8868\u5b58\u6210Excel\u8868\u683c\u7684\u65b9\u6cd5\u6709\u5f88\u591a\uff0c\u5305\u62ec\u4f7f\u7528pandas\u5e93\u3001openpyxl\u5e93\u3001xlsxwriter\u5e93\u7b49\u3002\u63a8\u8350\u4f7f\u7528pandas\u5e93\uff0c\u56e0\u4e3a\u5b83\u529f\u80fd\u5f3a\u5927\u3001\u4f7f\u7528\u7b80\u5355\u3001\u652f\u6301\u591a\u79cd\u6570\u636e\u683c\u5f0f\u3002\u672c\u6587\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528pandas\u5c06\u5217\u8868\u5b58\u6210Excel\u8868\u683c\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5b89\u88c5\u6240\u9700\u5e93<\/p>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u786e\u4fdd\u4f60\u5df2\u7ecf\u5b89\u88c5\u4e86pandas\u548copenpyxl\u5e93\u3002\u5982\u679c\u6ca1\u6709\u5b89\u88c5\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">pip install pandas openpyxl<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>pandas\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u6570\u636e\u5904\u7406\u5e93\uff0c\u800copenpyxl\u5219\u662f\u4e00\u4e2a\u4e13\u95e8\u7528\u4e8e\u8bfb\u5199Excel\u6587\u4ef6\u7684\u5e93\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u521b\u5efa\u6570\u636e\u5e76\u8f6c\u6362\u4e3aDataFrame<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u5217\u8868\uff0c\u7136\u540e\u5c06\u5176\u8f6c\u6362\u4e3apandas\u7684DataFrame\u5bf9\u8c61\u3002DataFrame\u662fpandas\u4e2d\u6700\u91cd\u8981\u7684\u6570\u636e\u7ed3\u6784\u4e4b\u4e00\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fdb\u884c\u6570\u636e\u64cd\u4f5c\u548c\u5206\u6790\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<h2><strong>\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u5217\u8868<\/strong><\/h2>\n<p>data = [<\/p>\n<p>    [&#39;Name&#39;, &#39;Age&#39;, &#39;City&#39;],<\/p>\n<p>    [&#39;Alice&#39;, 25, &#39;New York&#39;],<\/p>\n<p>    [&#39;Bob&#39;, 30, &#39;San Francisco&#39;],<\/p>\n<p>    [&#39;Charlie&#39;, 35, &#39;Los Angeles&#39;]<\/p>\n<p>]<\/p>\n<h2><strong>\u5c06\u5217\u8868\u8f6c\u6362\u4e3aDataFrame<\/strong><\/h2>\n<p>df = pd.DataFrame(data[1:], columns=data[0])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a\u5305\u542b\u59d3\u540d\u3001\u5e74\u9f84\u548c\u57ce\u5e02\u4fe1\u606f\u7684\u5217\u8868\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3aDataFrame\u3002\u6ce8\u610f\uff0c\u6211\u4eec\u4f7f\u7528\u4e86<code>data[1:]<\/code>\u6765\u6392\u9664\u7b2c\u4e00\u884c\u6807\u9898\uff0c\u5e76\u5c06\u5176\u4f20\u9012\u7ed9<code>columns<\/code>\u53c2\u6570\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u5c06DataFrame\u5199\u5165Excel\u6587\u4ef6<\/p>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u4f7f\u7528pandas\u7684<code>to_excel<\/code>\u65b9\u6cd5\u5c06DataFrame\u5199\u5165Excel\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u5c06DataFrame\u5199\u5165Excel\u6587\u4ef6<\/p>\n<p>df.to_excel(&#39;output.xlsx&#39;, index=False)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u5c06DataFrame\u5199\u5165\u4e00\u4e2a\u540d\u4e3a<code>output.xlsx<\/code>\u7684Excel\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528<code>index=False<\/code>\u53c2\u6570\u6765\u907f\u514d\u5199\u5165\u884c\u7d22\u5f15\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u6dfb\u52a0\u6837\u5f0f\u548c\u683c\u5f0f<\/p>\n<\/p>\n<p><p>\u6709\u65f6\u5019\uff0c\u6211\u4eec\u53ef\u80fd\u5e0c\u671b\u5bf9Excel\u6587\u4ef6\u8fdb\u884c\u4e00\u4e9b\u683c\u5f0f\u5316\u548c\u6837\u5f0f\u5904\u7406\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528pandas\u548copenpyxl\u5e93\u5b9e\u73b0\u8fd9\u4e00\u76ee\u6807\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from openpyxl import load_workbook<\/p>\n<p>from openpyxl.styles import Font, Alignment<\/p>\n<h2><strong>\u52a0\u8f7dExcel\u6587\u4ef6<\/strong><\/h2>\n<p>wb = load_workbook(&#39;output.xlsx&#39;)<\/p>\n<p>ws = wb.active<\/p>\n<h2><strong>\u8bbe\u7f6e\u6807\u9898\u884c\u7684\u6837\u5f0f<\/strong><\/h2>\n<p>header_font = Font(bold=True, color=&quot;FFFFFF&quot;)<\/p>\n<p>header_fill = PatternFill(&quot;solid&quot;, fgColor=&quot;4F81BD&quot;)<\/p>\n<p>alignment = Alignment(horizontal=&#39;center&#39;)<\/p>\n<p>for cell in ws[1]:<\/p>\n<p>    cell.font = header_font<\/p>\n<p>    cell.fill = header_fill<\/p>\n<p>    cell.alignment = alignment<\/p>\n<h2><strong>\u4fdd\u5b58\u66f4\u6539<\/strong><\/h2>\n<p>wb.save(&#39;styled_output.xlsx&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528openpyxl\u5e93\u52a0\u8f7dExcel\u6587\u4ef6\uff0c\u5e76\u5bf9\u6807\u9898\u884c\u7684\u5b57\u4f53\u3001\u80cc\u666f\u989c\u8272\u548c\u5bf9\u9f50\u65b9\u5f0f\u8fdb\u884c\u4e86\u8bbe\u7f6e\u3002\u6700\u7ec8\uff0c\u6211\u4eec\u5c06\u66f4\u6539\u4fdd\u5b58\u5230\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\u4e2d\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u5904\u7406\u591a\u8868\u683c\u548c\u590d\u6742\u7ed3\u6784<\/p>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u9700\u8981\u5c06\u591a\u4e2a\u5217\u8868\u5199\u5165\u4e00\u4e2aExcel\u6587\u4ef6\u7684\u4e0d\u540c\u5de5\u4f5c\u8868\uff0c\u6216\u8005\u5904\u7406\u66f4\u590d\u6742\u7684\u6570\u636e\u7ed3\u6784\uff0c\u53ef\u4ee5\u4f7f\u7528pandas\u548cExcelWriter\u7c7b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u53e6\u4e00\u4e2a\u5217\u8868<\/p>\n<p>data2 = [<\/p>\n<p>    [&#39;Product&#39;, &#39;Price&#39;, &#39;Quantity&#39;],<\/p>\n<p>    [&#39;Apple&#39;, 1.2, 30],<\/p>\n<p>    [&#39;Banana&#39;, 0.5, 50],<\/p>\n<p>    [&#39;Cherry&#39;, 2.5, 20]<\/p>\n<p>]<\/p>\n<h2><strong>\u5c06\u5217\u8868\u8f6c\u6362\u4e3aDataFrame<\/strong><\/h2>\n<p>df2 = pd.DataFrame(data2[1:], columns=data2[0])<\/p>\n<h2><strong>\u4f7f\u7528ExcelWriter\u5c06\u591a\u4e2aDataFrame\u5199\u5165\u4e0d\u540c\u5de5\u4f5c\u8868<\/strong><\/h2>\n<p>with pd.ExcelWriter(&#39;multiple_sheets.xlsx&#39;) as writer:<\/p>\n<p>    df.to_excel(writer, sheet_name=&#39;Sheet1&#39;, index=False)<\/p>\n<p>    df2.to_excel(writer, sheet_name=&#39;Sheet2&#39;, index=False)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u53e6\u4e00\u4e2a\u5305\u542b\u4ea7\u54c1\u4fe1\u606f\u7684\u5217\u8868\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3aDataFrame\u3002\u7136\u540e\uff0c\u6211\u4eec\u4f7f\u7528ExcelWriter\u7c7b\u5c06\u4e24\u4e2aDataFrame\u5199\u5165\u540c\u4e00\u4e2aExcel\u6587\u4ef6\u7684\u4e0d\u540c\u5de5\u4f5c\u8868\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001\u8bfb\u53d6Excel\u6587\u4ef6<\/p>\n<\/p>\n<p><p>\u6709\u65f6\u5019\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u8bfb\u53d6\u73b0\u6709\u7684Excel\u6587\u4ef6\u5e76\u5bf9\u5176\u8fdb\u884c\u64cd\u4f5c\u3002pandas\u63d0\u4f9b\u4e86\u65b9\u4fbf\u7684<code>read_excel<\/code>\u65b9\u6cd5\u6765\u5b9e\u73b0\u8fd9\u4e00\u76ee\u6807\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u8bfb\u53d6Excel\u6587\u4ef6<\/p>\n<p>df_read = pd.read_excel(&#39;output.xlsx&#39;)<\/p>\n<h2><strong>\u663e\u793a\u6570\u636e<\/strong><\/h2>\n<p>print(df_read)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528pandas\u7684<code>read_excel<\/code>\u65b9\u6cd5\u8bfb\u53d6\u4e86\u4e4b\u524d\u521b\u5efa\u7684Excel\u6587\u4ef6\uff0c\u5e76\u5c06\u5176\u6570\u636e\u5b58\u50a8\u5728DataFrame\u5bf9\u8c61\u4e2d\u3002\u7136\u540e\uff0c\u6211\u4eec\u6253\u5370\u4e86\u6570\u636e\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><p>\u4e03\u3001\u5904\u7406\u5927\u6570\u636e\u96c6<\/p>\n<\/p>\n<p><p>\u5f53\u5904\u7406\u5927\u6570\u636e\u96c6\u65f6\uff0c\u76f4\u63a5\u5c06\u6570\u636e\u52a0\u8f7d\u5230\u5185\u5b58\u4e2d\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5185\u5b58\u4e0d\u8db3\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e00\u95ee\u9898\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5206\u5757\u8bfb\u53d6\u548c\u5199\u5165\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u4e00\u4e2a\u5927\u6570\u636e\u96c6<\/p>\n<p>import numpy as np<\/p>\n<p>data_large = np.random.rand(1000000, 3)<\/p>\n<h2><strong>\u5c06\u5927\u6570\u636e\u96c6\u8f6c\u6362\u4e3aDataFrame<\/strong><\/h2>\n<p>df_large = pd.DataFrame(data_large, columns=[&#39;A&#39;, &#39;B&#39;, &#39;C&#39;])<\/p>\n<h2><strong>\u5206\u5757\u5199\u5165Excel\u6587\u4ef6<\/strong><\/h2>\n<p>chunk_size = 100000<\/p>\n<p>num_chunks = len(df_large) \/\/ chunk_size + 1<\/p>\n<p>with pd.ExcelWriter(&#39;large_output.xlsx&#39;) as writer:<\/p>\n<p>    for i in range(num_chunks):<\/p>\n<p>        start_row = i * chunk_size<\/p>\n<p>        end_row = (i + 1) * chunk_size<\/p>\n<p>        df_chunk = df_large.iloc[start_row:end_row]<\/p>\n<p>        df_chunk.to_excel(writer, sheet_name=f&#39;Sheet{i+1}&#39;, index=False)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a\u5305\u542b\u4e00\u767e\u4e07\u884c\u968f\u673a\u6570\u636e\u7684\u5927\u6570\u636e\u96c6\uff0c\u5e76\u5c06\u5176\u5206\u5757\u5199\u5165Excel\u6587\u4ef6\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u907f\u514d\u5185\u5b58\u4e0d\u8db3\u7684\u95ee\u9898\u3002<\/p>\n<\/p>\n<p><p>\u516b\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u6211\u4eec\u4e86\u89e3\u4e86\u5982\u4f55\u4f7f\u7528pandas\u548copenpyxl\u5e93\u5c06\u5217\u8868\u5b58\u6210Excel\u8868\u683c\u3002\u6211\u4eec\u4e0d\u4ec5\u5b66\u4e60\u4e86\u57fa\u672c\u7684\u5199\u5165\u65b9\u6cd5\uff0c\u8fd8\u638c\u63e1\u4e86\u5982\u4f55\u8fdb\u884c\u6837\u5f0f\u548c\u683c\u5f0f\u8bbe\u7f6e\u3001\u5904\u7406\u591a\u8868\u683c\u548c\u590d\u6742\u7ed3\u6784\u3001\u8bfb\u53d6Excel\u6587\u4ef6\u4ee5\u53ca\u5904\u7406\u5927\u6570\u636e\u96c6\u3002\u5e0c\u671b\u8fd9\u4e9b\u5185\u5bb9\u80fd\u591f\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u4f7f\u7528Python\u8fdb\u884c\u6570\u636e\u5904\u7406\u548c\u5206\u6790\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5c06\u5217\u8868\u5bfc\u51fa\u4e3aExcel\u8868\u683c\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>pandas<\/code>\u5e93\u5c06\u5217\u8868\u8f7b\u677e\u5bfc\u51fa\u4e3aExcel\u8868\u683c\u3002\u9996\u5148\uff0c\u60a8\u9700\u8981\u5b89\u88c5<code>pandas<\/code>\u548c<code>openpyxl<\/code>\u5e93\u3002\u4f7f\u7528<code>pandas.DataFrame()<\/code>\u5c06\u5217\u8868\u8f6c\u6362\u4e3a\u6570\u636e\u6846\uff0c\u7136\u540e\u4f7f\u7528<code>to_excel()<\/code>\u65b9\u6cd5\u5c06\u5176\u4fdd\u5b58\u4e3aExcel\u6587\u4ef6\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">import pandas as pd\n\ndata = [[&#39;Alice&#39;, 24], [&#39;Bob&#39;, 30], [&#39;Charlie&#39;, 22]]\ndf = pd.DataFrame(data, columns=[&#39;Name&#39;, &#39;Age&#39;])\ndf.to_excel(&#39;output.xlsx&#39;, index=False)\n<\/code><\/pre>\n<p>\u8fd9\u6837\u5c31\u80fd\u5c06\u5217\u8868\u4fdd\u5b58\u4e3a\u540d\u4e3a<code>output.xlsx<\/code>\u7684Excel\u6587\u4ef6\u3002<\/p>\n<p><strong>\u4f7f\u7528Python\u4fdd\u5b58\u5217\u8868\u4e3aExcel\u65f6\uff0c\u662f\u5426\u53ef\u4ee5\u81ea\u5b9a\u4e49\u5217\u540d\uff1f<\/strong><br \/>\u5f53\u7136\u53ef\u4ee5\u3002\u5728\u521b\u5efa<code>DataFrame<\/code>\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7<code>columns<\/code>\u53c2\u6570\u81ea\u5b9a\u4e49\u5217\u540d\u3002\u53ea\u9700\u5728\u521b\u5efa<code>DataFrame<\/code>\u65f6\u4f20\u5165\u4e00\u4e2a\u5305\u542b\u5217\u540d\u7684\u5217\u8868\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">df = pd.DataFrame(data, columns=[&#39;\u59d3\u540d&#39;, &#39;\u5e74\u9f84&#39;])\n<\/code><\/pre>\n<p>\u8fd9\u6837\uff0c\u751f\u6210\u7684Excel\u8868\u683c\u4e2d\u5c31\u4f1a\u663e\u793a\u60a8\u6307\u5b9a\u7684\u5217\u540d\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\uff0c\u5982\u4f55\u5904\u7406\u5b58\u50a8\u4e3aExcel\u8868\u683c\u65f6\u7684\u6570\u636e\u683c\u5f0f\uff1f<\/strong><br \/>\u5728\u5c06\u5217\u8868\u5b58\u50a8\u4e3aExcel\u65f6\uff0c\u786e\u4fdd\u6570\u636e\u7c7b\u578b\u6b63\u786e\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002<code>pandas<\/code>\u4f1a\u81ea\u52a8\u8bc6\u522b\u6570\u636e\u7c7b\u578b\uff0c\u4f46\u5982\u679c\u9700\u8981\u7279\u5b9a\u683c\u5f0f\uff0c\u6bd4\u5982\u65e5\u671f\u683c\u5f0f\uff0c\u53ef\u4ee5\u5728\u521b\u5efa<code>DataFrame<\/code>\u65f6\u8fdb\u884c\u8f6c\u6362\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528<code>pd.to_datetime()<\/code>\u51fd\u6570\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u65e5\u671f\u7c7b\u578b\u3002\u4f8b\u5982\uff1a  <\/p>\n<pre><code class=\"language-python\">data = [[&#39;Alice&#39;, &#39;2021-01-01&#39;], [&#39;Bob&#39;, &#39;2020-05-15&#39;]]\ndf = pd.DataFrame(data, columns=[&#39;Name&#39;, &#39;Date&#39;])\ndf[&#39;Date&#39;] = pd.to_datetime(df[&#39;Date&#39;])\ndf.to_excel(&#39;output.xlsx&#39;, index=False)\n<\/code><\/pre>\n<p>\u8fd9\u6837\u53ef\u4ee5\u786e\u4fdd\u5728Excel\u4e2d\u65e5\u671f\u683c\u5f0f\u6b63\u786e\u663e\u793a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u5c06\u5217\u8868\u5b58\u6210Excel\u8868\u683c\u7684\u65b9\u6cd5\u6709\u5f88\u591a\uff0c\u5305\u62ec\u4f7f\u7528pandas\u5e93\u3001openpyxl\u5e93\u3001xlsxwrit [&hellip;]","protected":false},"author":3,"featured_media":1046176,"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\/1046151"}],"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=1046151"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1046151\/revisions"}],"predecessor-version":[{"id":1046179,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1046151\/revisions\/1046179"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1046176"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1046151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1046151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1046151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}