{"id":947394,"date":"2024-12-26T23:51:16","date_gmt":"2024-12-26T15:51:16","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/947394.html"},"modified":"2024-12-26T23:51:17","modified_gmt":"2024-12-26T15:51:17","slug":"python-%e5%a6%82%e4%bd%95%e8%ae%a1%e7%ae%97%e8%a1%8c%e6%95%b0","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/947394.html","title":{"rendered":"python \u5982\u4f55\u8ba1\u7b97\u884c\u6570"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25083210\/7a87e9ff-2fb5-46f7-87c9-cb8e3f2ccdba.webp\" alt=\"python \u5982\u4f55\u8ba1\u7b97\u884c\u6570\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u6765\u8ba1\u7b97\u6587\u4ef6\u4e2d\u7684\u884c\u6570\u3001\u5217\u8868\u4e2d\u7684\u5143\u7d20\u884c\u6570\u6216\u5b57\u7b26\u4e32\u4e2d\u7684\u884c\u6570\u3002\u5e38\u7528\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528\u6587\u4ef6\u8bfb\u53d6\u3001\u8ba1\u6570\u751f\u6210\u5668\u3001\u5185\u5efa\u51fd\u6570\u7b49\u3002<\/strong>\u8fd9\u4e9b\u65b9\u6cd5\u5404\u6709\u5176\u4f18\u70b9\uff0c\u9009\u62e9\u4f7f\u7528\u54ea\u79cd\u65b9\u6cd5\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u4f7f\u7528\u573a\u666f\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>readlines()<\/code>\u65b9\u6cd5\u53ef\u4ee5\u5feb\u901f\u8bfb\u53d6\u6587\u4ef6\u4e2d\u7684\u6240\u6709\u884c\uff0c\u800c\u4f7f\u7528\u751f\u6210\u5668\u5219\u53ef\u4ee5\u5728\u5904\u7406\u5927\u6587\u4ef6\u65f6\u8282\u7701\u5185\u5b58\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u6cd5\u53ca\u5176\u9002\u7528\u573a\u666f\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u4f7f\u7528\u6587\u4ef6\u5bf9\u8c61\u8bfb\u53d6\u884c\u6570  <\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u6700\u5e38\u89c1\u7684\u8ba1\u7b97\u6587\u4ef6\u884c\u6570\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u6587\u4ef6\u5bf9\u8c61\u8bfb\u53d6\u6587\u4ef6\u3002\u901a\u8fc7\u9010\u884c\u8bfb\u53d6\u6587\u4ef6\uff0c\u53ef\u4ee5\u7cbe\u786e\u5730\u8ba1\u7b97\u51fa\u6587\u4ef6\u4e2d\u7684\u884c\u6570\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u4f7f\u7528readlines()\u65b9\u6cd5<\/strong><\/li>\n<\/ol>\n<p><p><code>readlines()<\/code>\u65b9\u6cd5\u53ef\u4ee5\u4e00\u6b21\u6027\u8bfb\u53d6\u6587\u4ef6\u7684\u6240\u6709\u884c\uff0c\u5e76\u8fd4\u56de\u4e00\u4e2a\u5305\u542b\u6240\u6709\u884c\u7684\u5217\u8868\u3002\u901a\u8fc7\u8ba1\u7b97\u5217\u8868\u7684\u957f\u5ea6\uff0c\u6211\u4eec\u53ef\u4ee5\u5f97\u5230\u6587\u4ef6\u7684\u603b\u884c\u6570\u3002\u8fd9\u79cd\u65b9\u6cd5\u9002\u7528\u4e8e\u4e2d\u5c0f\u578b\u6587\u4ef6\uff0c\u56e0\u4e3a\u5b83\u5c06\u6574\u4e2a\u6587\u4ef6\u52a0\u8f7d\u5230\u5185\u5b58\u4e2d\uff0c\u5bf9\u4e8e\u5927\u578b\u6587\u4ef6\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5185\u5b58\u4e0d\u8db3\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def count_lines_with_readlines(file_path):<\/p>\n<p>    with open(file_path, &#39;r&#39;) as file:<\/p>\n<p>        lines = file.readlines()<\/p>\n<p>        return len(lines)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u4f7f\u7528for\u5faa\u73af\u8bfb\u53d6\u884c\u6570<\/strong><\/li>\n<\/ol>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u901a\u8fc7\u9010\u884c\u8bfb\u53d6\u6587\u4ef6\uff0c\u907f\u514d\u4e86\u4e00\u6b21\u6027\u52a0\u8f7d\u6574\u4e2a\u6587\u4ef6\u5230\u5185\u5b58\u4e2d\uff0c\u56e0\u6b64\u9002\u7528\u4e8e\u5904\u7406\u5927\u578b\u6587\u4ef6\u3002\u901a\u8fc7\u5728\u5faa\u73af\u4e2d\u8ba1\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u5f97\u5230\u6587\u4ef6\u7684\u884c\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def count_lines_with_for_loop(file_path):<\/p>\n<p>    count = 0<\/p>\n<p>    with open(file_path, &#39;r&#39;) as file:<\/p>\n<p>        for line in file:<\/p>\n<p>            count += 1<\/p>\n<p>    return count<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528\u751f\u6210\u5668\u8868\u8fbe\u5f0f\u8ba1\u7b97\u884c\u6570  <\/p>\n<\/p>\n<p><p>\u751f\u6210\u5668\u662f\u4e00\u79cd\u60f0\u6027\u6c42\u503c\u7684\u5e8f\u5217\u751f\u6210\u65b9\u6cd5\uff0c\u975e\u5e38\u9002\u5408\u7528\u4e8e\u5904\u7406\u5927\u578b\u6587\u4ef6\u3002\u901a\u8fc7\u751f\u6210\u5668\u8868\u8fbe\u5f0f\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u4e0d\u5360\u7528\u5927\u91cf\u5185\u5b58\u7684\u60c5\u51b5\u4e0b\uff0c\u8ba1\u7b97\u6587\u4ef6\u7684\u884c\u6570\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u4f7f\u7528\u751f\u6210\u5668\u8868\u8fbe\u5f0f<\/strong><\/li>\n<\/ol>\n<p><p>\u751f\u6210\u5668\u8868\u8fbe\u5f0f\u53ef\u4ee5\u5728\u4e00\u4e2a\u7b80\u5355\u7684\u8bed\u53e5\u4e2d\u5b9e\u73b0\u5bf9\u6587\u4ef6\u884c\u6570\u7684\u8ba1\u7b97\uff0c\u5e76\u4e14\u4e0d\u4f1a\u5728\u5185\u5b58\u4e2d\u5b58\u50a8\u6574\u4e2a\u6587\u4ef6\u5185\u5bb9\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def count_lines_with_generator(file_path):<\/p>\n<p>    with open(file_path, &#39;r&#39;) as file:<\/p>\n<p>        return sum(1 for _ in file)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528\u5185\u5efa\u51fd\u6570\u548c\u5e93  <\/p>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86\u4e00\u4e9b\u5185\u5efa\u51fd\u6570\u548c\u5e93\uff0c\u53ef\u4ee5\u7b80\u5316\u884c\u6570\u8ba1\u7b97\u7684\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u4f7f\u7528map()\u548csum()\u51fd\u6570<\/strong><\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u5c06\u6bcf\u4e00\u884c\u6620\u5c04\u4e3a1\uff0c\u7136\u540e\u4f7f\u7528sum()\u51fd\u6570\u8fdb\u884c\u6c42\u548c\uff0c\u53ef\u4ee5\u5feb\u901f\u5f97\u5230\u6587\u4ef6\u7684\u884c\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def count_lines_with_map(file_path):<\/p>\n<p>    with open(file_path, &#39;r&#39;) as file:<\/p>\n<p>        return sum(map(lambda _: 1, file))<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u4f7f\u7528pandas\u5e93<\/strong><\/li>\n<\/ol>\n<p><p>\u5bf9\u4e8e\u6570\u636e\u5206\u6790\u4efb\u52a1\uff0cpandas\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u5de5\u5177\u3002\u4f7f\u7528pandas\u8bfb\u53d6\u6587\u4ef6\uff0c\u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u83b7\u5f97\u6587\u4ef6\u7684\u884c\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pandas as pd<\/p>\n<p>def count_lines_with_pandas(file_path):<\/p>\n<p>    df = pd.read_csv(file_path)<\/p>\n<p>    return len(df)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u8ba1\u7b97\u5b57\u7b26\u4e32\u6216\u5217\u8868\u4e2d\u7684\u884c\u6570  <\/p>\n<\/p>\n<p><p>\u9664\u4e86\u6587\u4ef6\u884c\u6570\u8ba1\u7b97\uff0c\u6709\u65f6\u6211\u4eec\u9700\u8981\u8ba1\u7b97\u5b57\u7b26\u4e32\u6216\u5217\u8868\u4e2d\u7684\u884c\u6570\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u8ba1\u7b97\u5b57\u7b26\u4e32\u4e2d\u7684\u884c\u6570<\/strong><\/li>\n<\/ol>\n<p><p>\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528splitlines()\u65b9\u6cd5\u6765\u8ba1\u7b97\u5b57\u7b26\u4e32\u4e2d\u7684\u884c\u6570\u3002\u6b64\u65b9\u6cd5\u4f1a\u6839\u636e\u6362\u884c\u7b26\u5206\u5272\u5b57\u7b26\u4e32\uff0c\u5e76\u8fd4\u56de\u4e00\u4e2a\u5305\u542b\u5404\u884c\u7684\u5217\u8868\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def count_lines_in_string(s):<\/p>\n<p>    return len(s.splitlines())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u8ba1\u7b97\u5217\u8868\u4e2d\u7684\u884c\u6570<\/strong><\/li>\n<\/ol>\n<p><p>\u5f53\u6211\u4eec\u6709\u4e00\u4e2a\u5217\u8868\uff0c\u5176\u4e2d\u6bcf\u4e2a\u5143\u7d20\u4ee3\u8868\u4e00\u884c\u65f6\uff0c\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528len()\u51fd\u6570\u6765\u8ba1\u7b97\u884c\u6570\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def count_lines_in_list(lst):<\/p>\n<p>    return len(lst)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e94\u3001\u5904\u7406\u5927\u6587\u4ef6\u7684\u6280\u5de7  <\/p>\n<\/p>\n<p><p>\u5728\u5904\u7406\u5927\u6587\u4ef6\u65f6\uff0c\u5185\u5b58\u7ba1\u7406\u662f\u4e00\u4e2a\u91cd\u8981\u7684\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5904\u7406\u5927\u6587\u4ef6\u7684\u6280\u5de7\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u4f7f\u7528\u5185\u5b58\u6620\u5c04<\/strong><\/li>\n<\/ol>\n<p><p>\u5bf9\u4e8e\u975e\u5e38\u5927\u7684\u6587\u4ef6\uff0c\u4f7f\u7528\u5185\u5b58\u6620\u5c04\u6280\u672f\u53ef\u4ee5\u6709\u6548\u5730\u7ba1\u7406\u5185\u5b58\u3002\u5185\u5b58\u6620\u5c04\u5141\u8bb8\u6211\u4eec\u5c06\u6587\u4ef6\u7684\u4e00\u90e8\u5206\u6620\u5c04\u5230\u5185\u5b58\u4e2d\uff0c\u800c\u4e0d\u662f\u5c06\u6574\u4e2a\u6587\u4ef6\u52a0\u8f7d\u5230\u5185\u5b58\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u5206\u5757\u8bfb\u53d6<\/strong><\/li>\n<\/ol>\n<p><p>\u5206\u5757\u8bfb\u53d6\u662f\u4e00\u79cd\u6709\u6548\u7684\u5185\u5b58\u7ba1\u7406\u7b56\u7565\u3002\u901a\u8fc7\u5c06\u6587\u4ef6\u5206\u6210\u8f83\u5c0f\u7684\u5757\u8fdb\u884c\u8bfb\u53d6\uff0c\u53ef\u4ee5\u51cf\u5c11\u5185\u5b58\u5360\u7528\uff0c\u540c\u65f6\u63d0\u9ad8\u8bfb\u53d6\u901f\u5ea6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def count_lines_with_chunk(file_path, chunk_size=1024*1024):<\/p>\n<p>    count = 0<\/p>\n<p>    with open(file_path, &#39;r&#39;) as file:<\/p>\n<p>        while True:<\/p>\n<p>            data = file.read(chunk_size)<\/p>\n<p>            if not data:<\/p>\n<p>                break<\/p>\n<p>            count += data.count(&#39;\\n&#39;)<\/p>\n<p>    return count<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u516d\u3001\u603b\u7ed3  <\/p>\n<\/p>\n<p><p>Python\u63d0\u4f9b\u4e86\u591a\u79cd\u8ba1\u7b97\u884c\u6570\u7684\u65b9\u6cd5\uff0c\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u4f18\u7f3a\u70b9\u3002\u5bf9\u4e8e\u5c0f\u578b\u6587\u4ef6\uff0c\u4f7f\u7528<code>readlines()<\/code>\u6216<code>pandas<\/code>\u5e93\u662f\u975e\u5e38\u65b9\u4fbf\u7684\u9009\u62e9\uff1b\u800c\u5bf9\u4e8e\u5927\u578b\u6587\u4ef6\uff0c\u4f7f\u7528\u751f\u6210\u5668\u8868\u8fbe\u5f0f\u6216\u5206\u5757\u8bfb\u53d6\u5219\u662f\u66f4\u4e3a\u5408\u9002\u7684\u9009\u62e9\u3002\u901a\u8fc7\u5408\u7406\u9009\u62e9\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u4fdd\u8bc1\u6548\u7387\u7684\u540c\u65f6\uff0c\u907f\u514d\u5185\u5b58\u4e0d\u8db3\u7684\u95ee\u9898\u3002\u65e0\u8bba\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\uff0c\u7406\u89e3\u5176\u5de5\u4f5c\u539f\u7406\u548c\u9002\u7528\u573a\u666f\u662f\u81f3\u5173\u91cd\u8981\u7684\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5feb\u901f\u8ba1\u7b97\u6587\u672c\u6587\u4ef6\u7684\u884c\u6570\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684\u6587\u4ef6\u64cd\u4f5c\u529f\u80fd\u6765\u8ba1\u7b97\u6587\u672c\u6587\u4ef6\u7684\u884c\u6570\u3002\u53ef\u4ee5\u901a\u8fc7\u6253\u5f00\u6587\u4ef6\u5e76\u904d\u5386\u6bcf\u4e00\u884c\u6765\u5b9e\u73b0\uff0c\u6216\u8005\u4f7f\u7528<code>readlines()<\/code>\u65b9\u6cd5\u5c06\u6240\u6709\u884c\u8bfb\u5165\u5217\u8868\u4e2d\uff0c\u7136\u540e\u8ba1\u7b97\u5217\u8868\u7684\u957f\u5ea6\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\u4ee3\u7801\uff1a  <\/p>\n<pre><code class=\"language-python\">with open(&#39;yourfile.txt&#39;, &#39;r&#39;) as file:\n    line_count = sum(1 for line in file)\nprint(f&#39;\u6587\u4ef6\u7684\u884c\u6570\u4e3a: {line_count}&#39;)\n<\/code><\/pre>\n<p><strong>\u662f\u5426\u53ef\u4ee5\u901a\u8fc7Pandas\u5e93\u6765\u8ba1\u7b97CSV\u6587\u4ef6\u7684\u884c\u6570\uff1f<\/strong><br \/>\u662f\u7684\uff0cPandas\u5e93\u63d0\u4f9b\u4e86\u4e00\u79cd\u7b80\u4fbf\u7684\u65b9\u6cd5\u6765\u8bfb\u53d6\u548c\u5904\u7406CSV\u6587\u4ef6\u3002\u4f7f\u7528<code>pandas.read_csv()<\/code>\u51fd\u6570\u8bfb\u53d6\u6587\u4ef6\u540e\uff0c\u53ef\u4ee5\u5229\u7528DataFrame\u7684<code>shape<\/code>\u5c5e\u6027\u6765\u83b7\u53d6\u884c\u6570\u3002\u793a\u4f8b\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import pandas as pd\n\ndf = pd.read_csv(&#39;yourfile.csv&#39;)\nline_count = df.shape[0]\nprint(f&#39;CSV\u6587\u4ef6\u7684\u884c\u6570\u4e3a: {line_count}&#39;)\n<\/code><\/pre>\n<p><strong>\u5728\u5927\u578b\u6587\u4ef6\u4e2d\u8ba1\u7b97\u884c\u6570\u4f1a\u5f71\u54cd\u6027\u80fd\u5417\uff1f<\/strong><br \/>\u5728\u5904\u7406\u5927\u578b\u6587\u4ef6\u65f6\uff0c\u8ba1\u7b97\u884c\u6570\u7684\u6027\u80fd\u53ef\u80fd\u4f1a\u53d7\u5230\u5f71\u54cd\u3002\u4f7f\u7528\u9010\u884c\u8bfb\u53d6\u7684\u65b9\u6cd5\u53ef\u80fd\u4f1a\u6bd4\u8f83\u6162\uff0c\u800c\u4f7f\u7528<code>readlines()<\/code>\u65b9\u6cd5\u5219\u4f1a\u5c06\u6574\u4e2a\u6587\u4ef6\u52a0\u8f7d\u5230\u5185\u5b58\u4e2d\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5185\u5b58\u4e0d\u8db3\u7684\u95ee\u9898\u3002\u5bf9\u4e8e\u975e\u5e38\u5927\u7684\u6587\u4ef6\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u7cfb\u7edf\u547d\u4ee4\uff0c\u5982Linux\u4e2d\u7684<code>wc -l<\/code>\uff0c\u5728Python\u4e2d\u901a\u8fc7<code>os<\/code>\u6a21\u5757\u8c03\u7528\u8be5\u547d\u4ee4\u6765\u63d0\u9ad8\u6548\u7387\u3002\u793a\u4f8b\u5982\u4e0b\uff1a  <\/p>\n<pre><code class=\"language-python\">import os\n\nline_count = int(os.popen(&#39;wc -l &lt; yourfile.txt&#39;).read())\nprint(f&#39;\u6587\u4ef6\u7684\u884c\u6570\u4e3a: {line_count}&#39;)\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u6765\u8ba1\u7b97\u6587\u4ef6\u4e2d\u7684\u884c\u6570\u3001\u5217\u8868\u4e2d\u7684\u5143\u7d20\u884c\u6570\u6216\u5b57\u7b26\u4e32\u4e2d\u7684\u884c\u6570\u3002\u5e38\u7528\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528\u6587\u4ef6 [&hellip;]","protected":false},"author":3,"featured_media":947402,"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\/947394"}],"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=947394"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/947394\/revisions"}],"predecessor-version":[{"id":947403,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/947394\/revisions\/947403"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/947402"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=947394"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=947394"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=947394"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}