{"id":1001547,"date":"2024-12-27T10:01:16","date_gmt":"2024-12-27T02:01:16","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1001547.html"},"modified":"2024-12-27T10:01:18","modified_gmt":"2024-12-27T02:01:18","slug":"python%e5%a6%82%e4%bd%95%e6%89%b9%e9%87%8f%e5%8e%bb%e7%a9%ba%e8%a1%8c","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1001547.html","title":{"rendered":"python\u5982\u4f55\u6279\u91cf\u53bb\u7a7a\u884c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25075659\/fe800603-ca1f-4d9b-81fd-4e8a0bb03b11.webp\" alt=\"python\u5982\u4f55\u6279\u91cf\u53bb\u7a7a\u884c\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\uff0c\u6279\u91cf\u53bb\u9664\u7a7a\u884c\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u8bfb\u53d6\u6587\u4ef6\u9010\u884c\u5904\u7406\u3001\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u3001\u4ee5\u53ca\u5229\u7528Python\u5185\u7f6e\u7684\u5de5\u5177\u5e93\u7b49\u3002\u5177\u4f53\u65b9\u6cd5\u5305\u62ec\uff1a\u8bfb\u53d6\u6587\u4ef6\u5e76\u9010\u884c\u5224\u65ad\u662f\u5426\u4e3a\u7a7a\u884c\u3001\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u5339\u914d\u548c\u5220\u9664\u7a7a\u884c\u3001\u5229\u7528Pandas\u7b49\u5de5\u5177\u5e93\u5904\u7406\u6570\u636e\u3002<\/strong>\u5176\u4e2d\uff0c\u6700\u5e38\u7528\u548c\u76f4\u63a5\u7684\u65b9\u6cd5\u662f\u8bfb\u53d6\u6587\u4ef6\u5e76\u9010\u884c\u5224\u65ad\u5e76\u5220\u9664\u7a7a\u884c\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\u548c\u6280\u5de7\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u8bfb\u53d6\u6587\u4ef6\u5e76\u9010\u884c\u5904\u7406<\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u8bfb\u53d6\u6587\u4ef6\u5e76\u9010\u884c\u5904\u7406\u662f\u53bb\u9664\u7a7a\u884c\u7684\u4e00\u79cd\u57fa\u672c\u65b9\u6cd5\u3002\u8fd9\u79cd\u65b9\u6cd5\u7684\u6838\u5fc3\u601d\u8def\u662f\uff1a\u6253\u5f00\u6587\u4ef6\uff0c\u9010\u884c\u8bfb\u53d6\u6bcf\u4e00\u884c\uff0c\u5224\u65ad\u662f\u5426\u4e3a\u7a7a\u884c\uff0c\u5982\u679c\u4e0d\u662f\u7a7a\u884c\uff0c\u5219\u5c06\u5176\u5199\u5165\u5230\u65b0\u7684\u6587\u4ef6\u4e2d\u3002<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00\u548c\u8bfb\u53d6\u6587\u4ef6<\/li>\n<\/ol>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u6253\u5f00\u4e00\u4e2a\u6587\u4ef6\u8fdb\u884c\u8bfb\u53d6\u3002\u53ef\u4ee5\u4f7f\u7528Python\u5185\u7f6e\u7684<code>open()<\/code>\u51fd\u6570\u6765\u6253\u5f00\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528<code>readlines()<\/code>\u65b9\u6cd5\u8bfb\u53d6\u6587\u4ef6\u7684\u6bcf\u4e00\u884c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def remove_blank_lines(input_file, output_file):<\/p>\n<p>    with open(input_file, &#39;r&#39;) as file:<\/p>\n<p>        lines = file.readlines()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4ee3\u7801\u7247\u6bb5\u4e2d\uff0c<code>input_file<\/code>\u662f\u8f93\u5165\u6587\u4ef6\u7684\u8def\u5f84\uff0c<code>output_file<\/code>\u662f\u8f93\u51fa\u6587\u4ef6\u7684\u8def\u5f84\u3002<code>readlines()<\/code>\u65b9\u6cd5\u5c06\u6587\u4ef6\u7684\u6bcf\u4e00\u884c\u8bfb\u53d6\u4e3a\u4e00\u4e2a\u5217\u8868\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>\u5224\u65ad\u548c\u8fc7\u6ee4\u7a7a\u884c<\/li>\n<\/ol>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u8981\u5224\u65ad\u6bcf\u4e00\u884c\u662f\u5426\u4e3a\u7a7a\u884c\u3002\u53ef\u4ee5\u4f7f\u7528Python\u7684\u5b57\u7b26\u4e32\u65b9\u6cd5<code>strip()<\/code>\u6765\u53bb\u9664\u884c\u9996\u548c\u884c\u5c3e\u7684\u7a7a\u767d\u7b26\uff0c\u7136\u540e\u5224\u65ad\u5176\u957f\u5ea6\u662f\u5426\u4e3a\u96f6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">    with open(output_file, &#39;w&#39;) as file:<\/p>\n<p>        for line in lines:<\/p>\n<p>            if line.strip():  # \u5982\u679c\u884c\u975e\u7a7a<\/p>\n<p>                file.write(line)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u91cc\uff0c<code>strip()<\/code>\u65b9\u6cd5\u79fb\u9664\u884c\u9996\u548c\u884c\u5c3e\u7684\u7a7a\u767d\u7b26\uff0c\u5982\u679c<code>strip()<\/code>\u540e\u7684\u884c\u957f\u5ea6\u4e0d\u4e3a\u96f6\uff0c\u5219\u8bf4\u660e\u8be5\u884c\u4e0d\u662f\u7a7a\u884c\uff0c\u5c06\u5176\u5199\u5165\u5230\u8f93\u51fa\u6587\u4ef6\u4e2d\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li>\u5b8c\u6574\u4ee3\u7801\u793a\u4f8b<\/li>\n<\/ol>\n<p><p>\u7efc\u5408\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e2a\u5b8c\u6574\u7684Python\u4ee3\u7801\u793a\u4f8b\uff0c\u7528\u4e8e\u53bb\u9664\u6587\u4ef6\u4e2d\u7684\u7a7a\u884c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def remove_blank_lines(input_file, output_file):<\/p>\n<p>    with open(input_file, &#39;r&#39;) as file:<\/p>\n<p>        lines = file.readlines()<\/p>\n<p>    with open(output_file, &#39;w&#39;) as file:<\/p>\n<p>        for line in lines:<\/p>\n<p>            if line.strip():<\/p>\n<p>                file.write(line)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8c03\u7528\u8fd9\u4e2a\u51fd\u6570\u65f6\uff0c\u53ea\u9700\u8981\u4f20\u5165\u8f93\u5165\u6587\u4ef6\u548c\u8f93\u51fa\u6587\u4ef6\u7684\u8def\u5f84\u5373\u53ef\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f<\/p>\n<\/p>\n<p><p>\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u4e00\u79cd\u5f3a\u5927\u7684\u5b57\u7b26\u4e32\u5904\u7406\u5de5\u5177\uff0c\u5728Python\u4e2d\u53ef\u4ee5\u4f7f\u7528<code>re<\/code>\u6a21\u5757\u6765\u5904\u7406\u3002\u901a\u8fc7\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u5feb\u901f\u627e\u5230\u5e76\u5220\u9664\u7a7a\u884c\u3002<\/p>\n<\/p>\n<ol>\n<li>\u7f16\u5199\u6b63\u5219\u8868\u8fbe\u5f0f<\/li>\n<\/ol>\n<p><p>\u8981\u5339\u914d\u7a7a\u884c\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u5f0f\uff1a<code>r&#39;^\\s*$\\n&#39;<\/code>\u3002\u8fd9\u4e2a\u6a21\u5f0f\u8868\u793a\u884c\u9996\u5230\u884c\u5c3e\u5168\u662f\u7a7a\u767d\u7b26\u7684\u884c\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u5220\u9664\u7a7a\u884c<\/li>\n<\/ol>\n<p><p>\u4f7f\u7528<code>re<\/code>\u6a21\u5757\u4e2d\u7684<code>sub()<\/code>\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5c06\u5339\u914d\u5230\u7684\u7a7a\u884c\u66ff\u6362\u4e3a\u7a7a\u5b57\u7b26\u4e32\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import re<\/p>\n<p>def remove_blank_lines_regex(input_file, output_file):<\/p>\n<p>    with open(input_file, &#39;r&#39;) as file:<\/p>\n<p>        content = file.read()<\/p>\n<p>    # \u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u66ff\u6362\u7a7a\u884c<\/p>\n<p>    content = re.sub(r&#39;^\\s*$\\n&#39;, &#39;&#39;, content, flags=re.MULTILINE)<\/p>\n<p>    with open(output_file, &#39;w&#39;) as file:<\/p>\n<p>        file.write(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u4e2a\u4ee3\u7801\u4e2d\uff0c<code>re.MULTILINE<\/code>\u6807\u5fd7\u7528\u4e8e\u5728\u591a\u884c\u6a21\u5f0f\u4e0b\u8fdb\u884c\u5339\u914d\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001\u5229\u7528Pandas\u5e93<\/p>\n<\/p>\n<p><p>Pandas\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u6570\u636e\u5904\u7406\u5e93\uff0c\u901a\u5e38\u7528\u4e8e\u5904\u7406\u6570\u636e\u8868\u3002\u867d\u7136\u5b83\u901a\u5e38\u7528\u4e8e\u6570\u636e\u5206\u6790\uff0c\u4f46\u4e5f\u53ef\u4ee5\u7528\u4e8e\u7b80\u5355\u7684\u6587\u672c\u5904\u7406\u4efb\u52a1\u3002<\/p>\n<\/p>\n<ol>\n<li>\u4f7f\u7528Pandas\u8bfb\u53d6\u6587\u672c\u6570\u636e<\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u4f7f\u7528Pandas\u7684<code>read_csv()<\/code>\u51fd\u6570\u6765\u8bfb\u53d6\u6587\u672c\u6570\u636e\uff0c\u5c06\u5176\u89c6\u4e3a\u6570\u636e\u6846\uff08DataFrame\uff09\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>def remove_blank_lines_pandas(input_file, output_file):<\/p>\n<p>    # \u8bfb\u53d6\u6587\u4ef6\u5e76\u5c06\u5176\u89c6\u4e3a\u6570\u636e\u6846<\/p>\n<p>    df = pd.read_csv(input_file, header=None, names=[&#39;line&#39;])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u91cc\uff0c<code>header=None<\/code>\u8868\u793a\u6587\u4ef6\u6ca1\u6709\u6807\u9898\u884c\uff0c<code>names=[&#39;line&#39;]<\/code>\u4e3a\u6570\u636e\u6846\u7684\u5217\u547d\u540d\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>\u8fc7\u6ee4\u7a7a\u884c<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7Pandas\u7684<code>dropna()<\/code>\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u5220\u9664\u7a7a\u884c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">    # \u5220\u9664\u7a7a\u884c<\/p>\n<p>    df = df.dropna(subset=[&#39;line&#39;])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li>\u4fdd\u5b58\u7ed3\u679c<\/li>\n<\/ol>\n<p><p>\u6700\u540e\uff0c\u5c06\u7ed3\u679c\u4fdd\u5b58\u56de\u6587\u4ef6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">    # \u4fdd\u5b58\u5230\u8f93\u51fa\u6587\u4ef6<\/p>\n<p>    df.to_csv(output_file, index=False, header=False)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b8c\u6574\u4ee3\u7801\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>def remove_blank_lines_pandas(input_file, output_file):<\/p>\n<p>    df = pd.read_csv(input_file, header=None, names=[&#39;line&#39;])<\/p>\n<p>    df = df.dropna(subset=[&#39;line&#39;])<\/p>\n<p>    df.to_csv(output_file, index=False, header=False)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u6027\u80fd\u548c\u9002\u7528\u6027\u6bd4\u8f83<\/p>\n<\/p>\n<ol>\n<li>\u6587\u4ef6\u8bfb\u53d6\u9010\u884c\u5904\u7406\u6cd5<\/li>\n<\/ol>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u7b80\u5355\u76f4\u63a5\uff0c\u9002\u5408\u5904\u7406\u5c0f\u578b\u6587\u672c\u6587\u4ef6\uff0c\u4f46\u5728\u5904\u7406\u5927\u578b\u6587\u4ef6\u65f6\u6027\u80fd\u53ef\u80fd\u4e0d\u591f\u7406\u60f3\uff0c\u56e0\u4e3a\u9700\u8981\u9010\u884c\u8bfb\u53d6\u548c\u5199\u5165\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li>\u6b63\u5219\u8868\u8fbe\u5f0f\u6cd5<\/li>\n<\/ol>\n<p><p>\u6b63\u5219\u8868\u8fbe\u5f0f\u5728\u5904\u7406\u7b80\u5355\u6a21\u5f0f\u5339\u914d\u548c\u66ff\u6362\u65f6\u975e\u5e38\u9ad8\u6548\uff0c\u4f46\u53ef\u80fd\u5bf9\u5927\u578b\u6587\u4ef6\u7684\u5904\u7406\u901f\u5ea6\u6709\u9650\u5236\uff0c\u5c24\u5176\u662f\u5728\u590d\u6742\u5339\u914d\u65f6\u3002<\/p>\n<\/p>\n<ol start=\"3\">\n<li>Pandas\u5e93\u6cd5<\/li>\n<\/ol>\n<p><p>Pandas\u6cd5\u9002\u5408\u5904\u7406\u5e26\u6709\u7ed3\u6784\u5316\u6570\u636e\u7684\u6587\u4ef6\uff0c\u5982CSV\u683c\u5f0f\uff0c\u5c24\u5176\u5728\u9700\u8981\u8fdb\u4e00\u6b65\u6570\u636e\u5206\u6790\u65f6\u975e\u5e38\u6709\u7528\u3002\u7136\u800c\uff0c\u5bf9\u4e8e\u7b80\u5355\u7684\u6587\u672c\u5904\u7406\uff0c\u53ef\u80fd\u663e\u5f97\u8fc7\u4e8e\u590d\u6742\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u7efc\u4e0a\u6240\u8ff0\uff0cPython\u63d0\u4f9b\u4e86\u591a\u79cd\u65b9\u6cd5\u6765\u6279\u91cf\u53bb\u9664\u7a7a\u884c\uff0c\u5305\u62ec\u9010\u884c\u5904\u7406\u3001\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u548c\u5229\u7528Pandas\u5e93\u7b49\u3002\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u5e94\u7528\u573a\u666f\u548c\u6587\u4ef6\u5927\u5c0f\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u4ee5\u6839\u636e\u6587\u4ef6\u7c7b\u578b\u548c\u5904\u7406\u9700\u6c42\u7075\u6d3b\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u4ee5\u4fbf\u9ad8\u6548\u5730\u53bb\u9664\u7a7a\u884c\uff0c\u63d0\u9ad8\u6570\u636e\u5904\u7406\u6548\u7387\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u8bc6\u522b\u7a7a\u884c\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b57\u7b26\u4e32\u7684<code>strip()<\/code>\u65b9\u6cd5\u6765\u5224\u65ad\u4e00\u884c\u662f\u5426\u4e3a\u7a7a\u884c\u3002\u5f53\u4e00\u884c\u7684\u5185\u5bb9\u7ecf\u8fc7<code>strip()<\/code>\u5904\u7406\u540e\u4e3a\u7a7a\u5b57\u7b26\u4e32\u65f6\uff0c\u8bf4\u660e\u8be5\u884c\u662f\u7a7a\u884c\u3002\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528\u6761\u4ef6\u8bed\u53e5\u6765\u8fc7\u6ee4\u6389\u8fd9\u4e9b\u7a7a\u884c\u3002<\/p>\n<p><strong>\u4f7f\u7528Python\u5904\u7406\u6587\u4ef6\u65f6\uff0c\u5982\u4f55\u53bb\u9664\u7a7a\u884c\uff1f<\/strong><br \/>\u5904\u7406\u6587\u4ef6\u65f6\uff0c\u53ef\u4ee5\u9010\u884c\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\uff0c\u5e76\u5c06\u975e\u7a7a\u884c\u5199\u5165\u5230\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\u4e2d\u3002\u53ef\u4ee5\u5229\u7528<code>with open()<\/code>\u8bed\u53e5\u6765\u7b80\u5316\u6587\u4ef6\u7684\u8bfb\u53d6\u548c\u5199\u5165\u8fc7\u7a0b\uff0c\u786e\u4fdd\u6587\u4ef6\u5728\u5904\u7406\u5b8c\u6210\u540e\u81ea\u52a8\u5173\u95ed\u3002<\/p>\n<p><strong>\u662f\u5426\u6709\u73b0\u6210\u7684Python\u5e93\u53ef\u4ee5\u5e2e\u52a9\u5220\u9664\u7a7a\u884c\uff1f<\/strong><br \/>\u662f\u7684\uff0c\u6709\u4e00\u4e9b\u7b2c\u4e09\u65b9\u5e93\u5982<code>pandas<\/code>\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5904\u7406\u6570\u636e\u6587\u4ef6\u3002\u4f7f\u7528<code>pandas<\/code>\u7684<code>dropna()<\/code>\u65b9\u6cd5\uff0c\u80fd\u591f\u5feb\u901f\u5220\u9664\u5305\u542b\u7a7a\u884c\u7684\u6570\u636e\u6846\u3002\u6b64\u5916\uff0c\u5229\u7528<code>csv<\/code>\u5e93\u4e5f\u53ef\u4ee5\u901a\u8fc7\u8bfb\u53d6CSV\u6587\u4ef6\uff0c\u7b5b\u9009\u51fa\u6709\u6548\u6570\u636e\u884c\u6765\u53bb\u9664\u7a7a\u884c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u6279\u91cf\u53bb\u9664\u7a7a\u884c\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u8bfb\u53d6\u6587\u4ef6\u9010\u884c\u5904\u7406\u3001\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u3001\u4ee5\u53ca\u5229\u7528Python\u5185\u7f6e\u7684\u5de5 [&hellip;]","protected":false},"author":3,"featured_media":1001552,"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\/1001547"}],"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=1001547"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1001547\/revisions"}],"predecessor-version":[{"id":1001556,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1001547\/revisions\/1001556"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1001552"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1001547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1001547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1001547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}