{"id":57,"date":"2021-09-05T07:36:14","date_gmt":"2021-09-04T23:36:14","guid":{"rendered":"http:\/\/82.156.18.209\/?p=57"},"modified":"2023-09-23T20:07:54","modified_gmt":"2023-09-23T12:07:54","slug":"a%e8%82%a1%e8%82%a1%e7%a5%a8%e5%88%97%e8%a1%a8%e4%b8%8b%e8%bd%bd-%e4%bb%8e%e9%9b%b6%e5%88%b0%e5%ae%9e%e7%9b%982","status":"publish","type":"post","link":"\/?p=57","title":{"rendered":"A\u80a1\u80a1\u7968\u5217\u8868\u4e0b\u8f7d\u2014\u2014\u4ece\u96f6\u5230\u5b9e\u76d82"},"content":{"rendered":"<p>\u76ee\u524d\u5b9e\u76d8\u4e3b\u8981\u7528\u5230\u7684\u662fA\u80a1\u7684\u65e5\u7ebf\u6570\u636e\uff0c\u5728BaoStock\u3001Tushare\u3001AKShare\u7b49\u5e73\u53f0\u4e0a\uff0c\u5747\u80fd\u514d\u8d39\u4e0b\u8f7d\u65e5\u7ebf\u6570\u636e\uff0c\u6211\u4eec\u5148\u9009\u62e9BaoStock\u4f5c\u4e3a\u6570\u636e\u6e90\u3002\u672c\u6587\u8bb0\u5f55\u4eceBaoStock\u4e0b\u8f7dA\u80a1\u80a1\u7968\u5217\u8868\u7684\u8fc7\u7a0b\u3002<\/p>\n<h1>BaoStock\u5b89\u88c5<\/h1>\n<p>\u6253\u5f00PyCharm\uff0c\u5728\u4e0b\u65b9Terminal\u7a97\u53e3\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff0c\u5b8c\u6210\u5b89\u88c5\uff1a<\/p>\n<pre><code class=\"language-bash line-numbers\">pip install baostock -i https:\/\/pypi.tuna.tsinghua.edu.cn\/simple\/ --trusted-host pypi.tuna.tsinghua.edu.cn\n<\/code><\/pre>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"\/wordpress\/wp-content\/uploads\/2021\/09\/pycharm10-1.png\"><img decoding=\"async\" src=\"\/wordpress\/wp-content\/uploads\/2021\/09\/pycharm10-1.png\" alt=\"\" \/><\/a><\/p>\n<hr \/>\n<h1>\u65b0\u5efa\u6e90\u6587\u4ef6<\/h1>\n<p>\u9996\u5148\uff0c\u65b0\u5efa\u6e90\u6587\u4ef6\uff0c\u9f20\u6807\u53f3\u952e\u70b9\u51fbPyCharm\u4e0bProject\u7a97\u53e3\u4e0b\u7684\u9879\u76ee\u76ee\u5f55\uff0c\u4f8b\u5982\u6211\u7684\u9879\u76ee\u76ee\u5f55\u662fmnj\uff0c\u7136\u540e\u4f9d\u6b21\u9009\u62e9New->Python File:<\/p>\n<p><a class=\"wp-editor-md-post-content-link\" href=\"\/wordpress\/wp-content\/uploads\/2021\/09\/download1.png\"><img decoding=\"async\" src=\"\/wordpress\/wp-content\/uploads\/2021\/09\/download1.png\" alt=\"\" \/><\/a><\/p>\n<p>\u8f93\u5165\u65b0\u5efa\u6587\u4ef6\u7684\u6587\u4ef6\u540d\uff0c\u4f8b\u5982data_center_v1\uff0c\u5728\u4e0b\u65b9\u9009\u62e9\u6587\u4ef6\u7c7b\u578b\u4e3aPython file\uff08\u9ed8\u8ba4\uff09\uff1a<br \/>\n<a class=\"wp-editor-md-post-content-link\" href=\"\/wordpress\/wp-content\/uploads\/2021\/09\/download2.png\"><img decoding=\"async\" src=\"\/wordpress\/wp-content\/uploads\/2021\/09\/download2.png\" alt=\"\" \/><\/a><\/p>\n<hr \/>\n<h1>\u4e3b\u8981\u4ee3\u7801\u5206\u6790<\/h1>\n<p>data_center_v1.py\u7684\u5168\u90e8\u5185\u5bb9\u89c1\u6587\u672b\uff0c\u4ee3\u7801\u4e3b\u8981\u5b9a\u4e49\u4e86\u51fd\u6570get_stock_codes\uff1a<\/p>\n<pre><code class=\"language-python line-numbers\">def get_stock_codes(date=None):\n<\/code><\/pre>\n<p>\u8be5\u51fd\u6570\u7528\u4e8e\u83b7\u53d6\u6307\u5b9a\u65e5\u671f\u7684A\u80a1\u4ee3\u7801\u5217\u8868\u3002\u5176\u4e2d\uff1a<br \/>\n&#8211; \u53c2\u6570date\u4e3a\u6307\u5b9a\u65e5\u671f\uff0c\u9ed8\u8ba4\u4e3a\u7a7a<br \/>\n&#8211; \u8fd4\u56de\u503c\u4e3aA\u80a1\u4ee3\u7801\u7684\u5217\u8868<\/p>\n<p>\u4e0d\u540c\u7684date\u8bbe\u7f6e\uff0c\u4f1a\u67093\u79cd\u60c5\u51b5\uff1a<br \/>\n&#8211; \u82e5\u53c2\u6570date\u4e3a\u7a7a\uff0c\u5219\u8fd4\u56de\u6700\u8fd11\u4e2a\u4ea4\u6613\u65e5\u7684A\u80a1\u4ee3\u7801\u5217\u8868<br \/>\n&#8211; \u82e5\u53c2\u6570date\u4e0d\u4e3a\u7a7a\uff0c\u4e14\u4e3a\u4ea4\u6613\u65e5\uff0c\u5219\u8fd4\u56dedate\u5f53\u65e5\u7684A\u80a1\u4ee3\u7801\u5217\u8868<br \/>\n&#8211; \u82e5\u53c2\u6570date\u4e0d\u4e3a\u7a7a\uff0c\u4f46\u4e0d\u4e3a\u4ea4\u6613\u65e5\uff0c\u5219\u6253\u5370\u63d0\u793a\u975e\u4ea4\u6613\u65e5\u4fe1\u606f\uff0c\u7a0b\u5e8f\u9000\u51fa<\/p>\n<pre><code class=\"language-python line-numbers\">    bs.login()\n<\/code><\/pre>\n<p>\u767b\u5f55BaoStock\uff0c\u6bcf\u6b21\u4eceBaoStock\u67e5\u8be2\u6570\u636e\u524d\uff0c\u90fd\u9700\u8981\u5148\u767b\u5f55\u3002<\/p>\n<pre><code class=\"language-python line-numbers\">    stock_df = bs.query_all_stock(date).get_data()\n<\/code><\/pre>\n<p>\u8c03\u7528baostock\u7684query_all_stock\u51fd\u6570\u67e5\u8be2\u80a1\u7968\u6570\u636e\uff0c\u8be5\u51fd\u6570<a class=\"wp-editor-md-post-content-link\" href=\"http:\/\/baostock.com\/baostock\/index.php\/Python_API\" title=\"\u5b98\u65b9\u6587\u6863\">\u5b98\u65b9\u6587\u6863<\/a>\u8bf4\u660e\u5982\u4e0b\uff1a<\/p>\n<blockquote><p>\n  \u8bc1\u5238\u4ee3\u7801\u67e5\u8be2\uff1aquery_all_stock()<br \/>\n  \u65b9\u6cd5\u8bf4\u660e\uff1a\u83b7\u53d6\u6307\u5b9a\u4ea4\u6613\u65e5\u671f\u6240\u6709\u80a1\u7968\u5217\u8868\u3002\u901a\u8fc7API\u63a5\u53e3\u83b7\u53d6\u8bc1\u5238\u4ee3\u7801\u53ca\u80a1\u7968\u4ea4\u6613\u72b6\u6001\u4fe1\u606f\uff0c\u4e0e\u65e5K\u7ebf\u6570\u636e\u540c\u65f6\u66f4\u65b0\u3002\u53ef\u4ee5\u901a\u8fc7\u53c2\u6570\u2018\u67d0\u4ea4\u6613\u65e5\u2019\u83b7\u53d6\u6570\u636e\uff08\u5305\u62ec\uff1aA\u80a1\u3001\u6307\u6570\uff09\uff0c\u6570\u636e\u8303\u56f4\u540c\u63a5\u53e3query_history_k_data_plus()\u3002<br \/>\n  \u8fd4\u56de\u7c7b\u578b\uff1apandas\u7684DataFrame\u7c7b\u578b\u3002<br \/>\n  \u66f4\u65b0\u65f6\u95f4\uff1a\u4e0e\u65e5K\u7ebf\u540c\u65f6\u66f4\u65b0\u3002\n<\/p><\/blockquote>\n<p>\u5176\u4e2d\u8fd4\u56de\u7c7b\u578b\u7ecf\u8fc7\u6d4b\u8bd5\u5b58\u5728\u95ee\u9898\uff0c\u901a\u8fc7\u4e0b\u9762\u4ee3\u7801\u6d4b\u8bd5\uff1a<\/p>\n<pre><code class=\"language-python line-numbers\">print(type(bs.query_all_stock())) # test code\n<\/code><\/pre>\n<p>\u6253\u5370\u7ed3\u679c\u4e3a\uff1a<\/p>\n<pre><code class=\"language-bash line-numbers\">&lt;class 'baostock.data.resultset.ResultData'&gt;\n<\/code><\/pre>\n<p>\u8be5\u51fd\u6570\u7684\u8fd4\u56de\u7c7b\u578b\u4e3abaostock\u81ea\u5b9a\u4e49\u7684\u6570\u636e\u7c7b\u578b\uff0c\u901a\u8fc7get_data\u51fd\u6570\u53ef\u4ee5\u83b7\u53d6Pandas DataFrame\u7c7b\u578b\u7684\u8fd4\u56de\u7ed3\u679c\uff1a<\/p>\n<pre><code class=\"language-python line-numbers\">print(type(bs.query_all_stock().get_data()))    # test code\n<\/code><\/pre>\n<p>\u6253\u5370\u7ed3\u679c\u4e3a\uff1a<\/p>\n<pre><code class=\"language-bash line-numbers\">&lt;class 'pandas.core.frame.DataFrame'&gt;\n<\/code><\/pre>\n<p>\u6211\u4eec\u6253\u5370get_data\u8fd4\u56de\u7684\u5168\u90e8\u6570\u636e\uff0c\u90e8\u5206\u7ed3\u679c\u5982\u4e0b\uff0c\u66f4\u591aDataFrame\u6253\u5370\u8bbe\u7f6e\u53ef\u53c2\u8003<a class=\"wp-editor-md-post-content-link\" href=\"\/?p=97\" title=\"\u94fe\u63a5\">\u94fe\u63a5<\/a>\u3002<\/p>\n<pre><code class=\"language-bash line-numbers\">           code tradeStatus                  code_name\n0     sh.000001           1                     \u4e0a\u8bc1\u7efc\u5408\u6307\u6570\n1     sh.000002           1                     \u4e0a\u8bc1A\u80a1\u6307\u6570\n2     sh.000003           1                     \u4e0a\u8bc1B\u80a1\u6307\u6570\n3     sh.000004           1                    \u4e0a\u8bc1\u5de5\u4e1a\u7c7b\u6307\u6570\n4     sh.000005           1                    \u4e0a\u8bc1\u5546\u4e1a\u7c7b\u6307\u6570\n...\n218   sh.600000           1                       \u6d66\u53d1\u94f6\u884c\n219   sh.600004           1                       \u767d\u4e91\u673a\u573a\n220   sh.600006           1                       \u4e1c\u98ce\u6c7d\u8f66\n221   sh.600007           1                       \u4e2d\u56fd\u56fd\u8d38\n222   sh.600008           1                       \u9996\u521b\u73af\u4fdd\n...\n2189  sz.000001           1                       \u5e73\u5b89\u94f6\u884c\n2190  sz.000002           1                        \u4e07\u79d1A\n2191  sz.000004           1                       \u56fd\u534e\u7f51\u5b89\n2192  sz.000005           1                       ST\u661f\u6e90\n2193  sz.000006           1                       \u6df1\u632f\u4e1aA\n...\n4960  sz.399994           1                 \u4e2d\u8bc1\u4fe1\u606f\u5b89\u5168\u4e3b\u9898\u6307\u6570\n4961  sz.399995           1                   \u4e2d\u8bc1\u57fa\u5efa\u5de5\u7a0b\u6307\u6570\n4962  sz.399996           1                   \u4e2d\u8bc1\u667a\u80fd\u5bb6\u5c45\u6307\u6570\n4963  sz.399997           1                     \u4e2d\u8bc1\u767d\u9152\u6307\u6570\n4964  sz.399998           1                     \u4e2d\u8bc1\u7164\u70ad\u6307\u6570\n<\/code><\/pre>\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u7ed3\u679c\u4e2d\u65e2\u5305\u542b\u80a1\u7968\u4ee3\u7801\uff0c\u4e5f\u5305\u62ec\u4e00\u4e9b\u6307\u6570\u7684\u4ee3\u7801\u3002\u5176\u4e2d\uff0c\u4e0a\u8bc1\u7684\u4ee3\u7801\u4ee5\u201csh.\u201d\u5f00\u5934\uff0c\u6df1\u8bc1\u7684\u4ee3\u7801\u4ee5\u201csz.\u201d\u5f00\u5934\u3002\u4ee3\u7801\u7684\u547d\u540d\u65b9\u5f0f\u5728\u4e0d\u540c\u6570\u636e\u6e90\u7684\u5f62\u5f0f\u53ef\u80fd\u4e0d\u540c\uff0c\u4f8b\u5982\u5728ptrade\u4e2d\uff0c\u4e0a\u8bc1\u80a1\u7968\u7684\u4ee3\u7801\u4ee5\u201c.SS\u201d\u7ed3\u5c3e\uff08\u5982600000.SS\uff09\uff0c\u6df1\u8bc1\u80a1\u7968\u7684\u4ee3\u7801\u4ee5\u201c.SZ\u201d\u7ed3\u5c3e\uff08\u5982000001.SZ\uff09\u3002<\/p>\n<pre><code class=\"language-python line-numbers\">    if 0 == len(stock_df):\n<\/code><\/pre>\n<p>\u5982\u679c\u83b7\u53d6\u6570\u636e\u957f\u5ea6\u4e3a0\uff0c\u8868\u793a\u65e5\u671fdate\u975e\u4ea4\u6613\u65e5\u3002<\/p>\n<pre><code class=\"language-python line-numbers\">        if date is not None:\n            print('\u5f53\u524d\u9009\u62e9\u65e5\u671f\u4e3a\u975e\u4ea4\u6613\u65e5\u6216\u5c1a\u65e0\u4ea4\u6613\u6570\u636e\uff0c\u8bf7\u8bbe\u7f6edate\u4e3a\u5386\u53f2\u67d0\u4ea4\u6613\u65e5\u65e5\u671f')\n            sys.exit(0)\n<\/code><\/pre>\n<p>\u5982\u679c\u8bbe\u7f6e\u4e86\u53c2\u6570date\uff0c\u5219\u6253\u5370\u4fe1\u606f\u63d0\u793adate\u4e3a\u975e\u4ea4\u6613\u65e5\u3002\u4f8b\u5982\uff0c\u5047\u5982\u8c03\u7528\u7a0b\u5e8f\u7684\u5f53\u5929\u4e3a\u975e\u4ea4\u6613\u65e5\uff0c\u8c03\u7528\u51fd\u6570\u65f6\u4f7f\u7528\u4e86\u5982\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre><code class=\"language-python line-numbers\">stock_codes = get_stock_codes(datetime.datetime.today())    # test code\n<\/code><\/pre>\n<p>\u90a3\u4e48\u7a0b\u5e8f\u5c31\u4f1a\u63d0\u793a\u975e\u4ea4\u6613\u65e5\uff0c\u5e76\u9000\u51fa\u3002\u5982\u679c\u60f3\u83b7\u53d6\u6700\u8fd1\u4ea4\u6613\u65e5\u7684\u6570\u636e\uff0c\u4e0d\u8bbe\u7f6e\u53c2\u6570\u76f4\u63a5\u8c03\u7528\u5373\u53ef\uff1a<\/p>\n<pre><code class=\"language-python line-numbers\">stock_codes = get_stock_codes() # test code\n<\/code><\/pre>\n<pre><code class=\"language-python line-numbers\">        delta = 1\n        while 0 == len(stock_df):\n            stock_df = bs.query_all_stock(datetime.date.today() - datetime.timedelta(days=delta)).get_data()\n            delta += 1\n<\/code><\/pre>\n<p>\u5982\u679c\u6ca1\u6709\u8bbe\u7f6e\u53c2\u6570date\uff0c\u5219\u5411\u5386\u53f2\u67e5\u627e\u6700\u8fd1\u7684\u4ea4\u6613\u65e5\uff0c\u5f53\u83b7\u53d6\u80a1\u7968\u6570\u636e\u957f\u5ea6\u975e0\u65f6\uff0c\u5373\u627e\u5230\u6700\u8fd1\u4ea4\u6613\u65e5\u3002<\/p>\n<pre><code class=\"language-python line-numbers\">    bs.logout()\n<\/code><\/pre>\n<p>\u6ce8\u9500BaoStock\u767b\u5f55\u3002<\/p>\n<pre><code class=\"language-python line-numbers\">    stock_df = stock_df[(stock_df['code'] &gt;= 'sh.600000') &amp; (stock_df['code'] &lt; 'sz.399000')]\n<\/code><\/pre>\n<p>\u7b5b\u9009\u80a1\u7968\u6570\u636e\uff0c\u4e0a\u8bc1\u548c\u6df1\u8bc1\u80a1\u7968\u4ee3\u7801\u5728sh.600000\u4e0esz.39900\u4e4b\u95f4\uff0c\u66f4\u591aDataFrame\u7b5b\u9009\u7684\u65b9\u6cd5\u53ef\u53c2\u8003<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/coderx.com.cn\/wordpress\/?p=164\" title=\"\u94fe\u63a5\">\u94fe\u63a5<\/a>\u3002<\/p>\n<pre><code class=\"language-python line-numbers\">    return stock_df['code'].tolist()\n<\/code><\/pre>\n<p>\u8fd4\u56de\u80a1\u7968\u5217\u8868\u3002<br \/>\n\u5f53\u6253\u5370\u8be5\u51fd\u6570\u8fd4\u56de\u503c\u65f6\uff0c\u90e8\u5206\u8f93\u51fa\u7ed3\u679c\u4e3a\uff1a<\/p>\n<pre><code class=\"language-bash line-numbers\">['sh.600000', 'sh.600004', 'sh.600006', 'sh.600007', 'sh.600008', ...,'sz.301049', 'sz.301050', 'sz.301051', 'sz.301052', 'sz.301053']\n<\/code><\/pre>\n<h1>\u5c0f\u7ed3<\/h1>\n<p>\u81f3\u6b64\uff0cA\u80a1\u80a1\u7968\u5217\u8868\u83b7\u53d6\u5b8c\u6bd5\uff0c\u4e0b\u4e00\u7bc7\u6587\u7ae0\u8bb0\u5f55\u4eceBaoStock\u4e0b\u8f7d\u8fd9\u4e9b\u80a1\u7968\u7684\u65e5\u7ebf\u6570\u636e\u7684\u65b9\u6cd5\u3002<\/p>\n<hr \/>\n<p>data_center_v1.py\u7684\u5168\u90e8\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-python line-numbers\">import baostock as bs\nimport datetime\nimport sys\n\n\ndef get_stock_codes(date=None):\n    \"\"\"\n    \u83b7\u53d6\u6307\u5b9a\u65e5\u671f\u7684A\u80a1\u4ee3\u7801\u5217\u8868\n\n    \u82e5\u53c2\u6570date\u4e3a\u7a7a\uff0c\u5219\u8fd4\u56de\u6700\u8fd11\u4e2a\u4ea4\u6613\u65e5\u7684A\u80a1\u4ee3\u7801\u5217\u8868\n    \u82e5\u53c2\u6570date\u4e0d\u4e3a\u7a7a\uff0c\u4e14\u4e3a\u4ea4\u6613\u65e5\uff0c\u5219\u8fd4\u56dedate\u5f53\u65e5\u7684A\u80a1\u4ee3\u7801\u5217\u8868\n    \u82e5\u53c2\u6570date\u4e0d\u4e3a\u7a7a\uff0c\u4f46\u4e0d\u4e3a\u4ea4\u6613\u65e5\uff0c\u5219\u6253\u5370\u63d0\u793a\u975e\u4ea4\u6613\u65e5\u4fe1\u606f\uff0c\u7a0b\u5e8f\u9000\u51fa\n\n    :param date: \u65e5\u671f\n    :return: A\u80a1\u4ee3\u7801\u7684\u5217\u8868\n    \"\"\"\n\n    # \u767b\u5f55baostock\n    bs.login()\n\n    # \u4eceBaoStock\u67e5\u8be2\u80a1\u7968\u6570\u636e\n    stock_df = bs.query_all_stock(date).get_data()\n\n    # \u5982\u679c\u83b7\u53d6\u6570\u636e\u957f\u5ea6\u4e3a0\uff0c\u8868\u793a\u65e5\u671fdate\u975e\u4ea4\u6613\u65e5\n    if 0 == len(stock_df):\n\n        # \u5982\u679c\u8bbe\u7f6e\u4e86\u53c2\u6570date\uff0c\u5219\u6253\u5370\u4fe1\u606f\u63d0\u793adate\u4e3a\u975e\u4ea4\u6613\u65e5\n        if date is not None:\n            print('\u5f53\u524d\u9009\u62e9\u65e5\u671f\u4e3a\u975e\u4ea4\u6613\u65e5\u6216\u5c1a\u65e0\u4ea4\u6613\u6570\u636e\uff0c\u8bf7\u8bbe\u7f6edate\u4e3a\u5386\u53f2\u67d0\u4ea4\u6613\u65e5\u65e5\u671f')\n            sys.exit(0)\n\n        # \u672a\u8bbe\u7f6e\u53c2\u6570date\uff0c\u5219\u5411\u5386\u53f2\u67e5\u627e\u6700\u8fd1\u7684\u4ea4\u6613\u65e5\uff0c\u5f53\u83b7\u53d6\u80a1\u7968\u6570\u636e\u957f\u5ea6\u975e0\u65f6\uff0c\u5373\u627e\u5230\u6700\u8fd1\u4ea4\u6613\u65e5\n        delta = 1\n        while 0 == len(stock_df):\n            stock_df = bs.query_all_stock(datetime.date.today() - datetime.timedelta(days=delta)).get_data()\n            delta += 1\n\n    # \u6ce8\u9500\u767b\u5f55\n    bs.logout()\n\n    # \u7b5b\u9009\u80a1\u7968\u6570\u636e\uff0c\u4e0a\u8bc1\u548c\u6df1\u8bc1\u80a1\u7968\u4ee3\u7801\u5728sh.600000\u4e0esz.39900\u4e4b\u95f4\n    stock_df = stock_df[(stock_df['code'] &gt;= 'sh.600000') &amp; (stock_df['code'] &lt; 'sz.399000')]\n\n    # \u8fd4\u56de\u80a1\u7968\u5217\u8868\n    return stock_df['code'].tolist()\n\n\nif __name__ == '__main__':\n    stock_codes = get_stock_codes()\n    print(stock_codes)\n<\/code><\/pre>\n<hr \/>\n<p><strong>\u535a\u5ba2\u5185\u5bb9\u53ea\u7528\u4e8e\u4ea4\u6d41\u5b66\u4e60\uff0c\u4e0d\u6784\u6210\u6295\u8d44\u5efa\u8bae\uff0c\u76c8\u4e8f\u81ea\u8d1f\uff01<\/strong><\/p>\n<p>\u6b22\u8fce\u5927\u5bb6\u8f6c\u53d1\u3001\u7559\u8a00\u3002\u5df2\u5efa\u5fae\u4fe1\u7fa4\u7528\u4e8e\u5b66\u4e60\u4ea4\u6d41\uff0c\u7fa41\u5df2\u6ee1\uff0c\u7fa42\u5df2\u521b\u5efa\uff0c\u611f\u5174\u8da3\u7684\u8bfb\u8005\u8bf7\u626b\u7801\u52a0\u5fae\u4fe1\uff01<\/p>\n<p>\u5982\u679c\u8ba4\u4e3a\u535a\u5ba2\u5bf9\u60a8\u6709\u5e2e\u52a9\uff0c\u53ef\u4ee5\u626b\u7801\u8fdb\u884c\u6350\u8d60\uff0c\u611f\u8c22\uff01<\/p>\n<table>\n<thead>\n<tr>\n<th align=\"center\">\u5fae\u4fe1\u4e8c\u7ef4\u7801<\/th>\n<th align=\"center\">\u5fae\u4fe1\u6350\u8d60\u4e8c\u7ef4\u7801<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td align=\"center\"><img decoding=\"async\" src=\"\/wordpress\/wp-content\/uploads\/2021\/11\/wechat_margin.png\" alt=\"\u5fae\u4fe1\u4e8c\u7ef4\u7801\" \/><\/td>\n<td align=\"center\"><img decoding=\"async\" src=\"\/wordpress\/wp-content\/uploads\/2021\/09\/wechatpay.png\" alt=\"\u6350\u8d60\u4e8c\u7ef4\u7801\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<style>\npre{\n    white-space: pre;\n    overflow-x: auto;\n    overflow-y: auto;\n    max-height: 300px;\n}\n.table-wrapper {\n    overflow-x: auto;\n    overflow-y: auto;\n    white-space: nowrap;\n    max-height: 300px;\n}\n<\/style>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u524d\u5b9e\u76d8\u4e3b\u8981\u7528\u5230\u7684\u662fA\u80a1\u7684\u65e5\u7ebf\u6570\u636e\uff0c\u5728BaoStock\u3001Tushare\u3001AKShare\u7b49\u5e73\u53f0\u4e0a\uff0c\u5747\u80fd\u514d\u8d39\u4e0b\u8f7d\u65e5 &#8230; <a title=\"A\u80a1\u80a1\u7968\u5217\u8868\u4e0b\u8f7d\u2014\u2014\u4ece\u96f6\u5230\u5b9e\u76d82\" class=\"read-more\" href=\"\/?p=57\" aria-label=\"\u7ee7\u7eed\u9605\u8bfbA\u80a1\u80a1\u7968\u5217\u8868\u4e0b\u8f7d\u2014\u2014\u4ece\u96f6\u5230\u5b9e\u76d82\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-57","post","type-post","status-publish","format-standard","hentry","category-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>A\u80a1\u80a1\u7968\u5217\u8868\u4e0b\u8f7d\u2014\u2014\u4ece\u96f6\u5230\u5b9e\u76d82 - Python\u91cf\u5316\u6280\u672f\u5206\u4eab<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/coderx.com.cn\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A\u80a1\u80a1\u7968\u5217\u8868\u4e0b\u8f7d\u2014\u2014\u4ece\u96f6\u5230\u5b9e\u76d82 - Python\u91cf\u5316\u6280\u672f\u5206\u4eab\" \/>\n<meta property=\"og:description\" content=\"\u76ee\u524d\u5b9e\u76d8\u4e3b\u8981\u7528\u5230\u7684\u662fA\u80a1\u7684\u65e5\u7ebf\u6570\u636e\uff0c\u5728BaoStock\u3001Tushare\u3001AKShare\u7b49\u5e73\u53f0\u4e0a\uff0c\u5747\u80fd\u514d\u8d39\u4e0b\u8f7d\u65e5 ... \u9605\u8bfb\u66f4\u591a\" \/>\n<meta property=\"og:url\" content=\"\/?p=57\" \/>\n<meta property=\"og:site_name\" content=\"Python\u91cf\u5316\u6280\u672f\u5206\u4eab\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-04T23:36:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-23T12:07:54+00:00\" \/>\n<meta name=\"author\" content=\"mnj\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"mnj\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/coderx.com.cn\/#article\",\"isPartOf\":{\"@id\":\"\/?p=57\"},\"author\":{\"name\":\"mnj\",\"@id\":\"http:\/\/coderx.com.cn\/#\/schema\/person\/4f9a19aed18c75500a890ab51b762ad3\"},\"headline\":\"A\u80a1\u80a1\u7968\u5217\u8868\u4e0b\u8f7d\u2014\u2014\u4ece\u96f6\u5230\u5b9e\u76d82\",\"datePublished\":\"2021-09-04T23:36:14+00:00\",\"dateModified\":\"2023-09-23T12:07:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"\/?p=57\"},\"wordCount\":93,\"commentCount\":1,\"publisher\":{\"@id\":\"http:\/\/coderx.com.cn\/#\/schema\/person\/4f9a19aed18c75500a890ab51b762ad3\"},\"articleSection\":[\"\u4ece\u96f6\u5230\u5b9e\u76d8\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/coderx.com.cn\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"\/?p=57\",\"url\":\"http:\/\/coderx.com.cn\/\",\"name\":\"A\u80a1\u80a1\u7968\u5217\u8868\u4e0b\u8f7d\u2014\u2014\u4ece\u96f6\u5230\u5b9e\u76d82 - Python\u91cf\u5316\u6280\u672f\u5206\u4eab\",\"isPartOf\":{\"@id\":\"http:\/\/coderx.com.cn\/#website\"},\"datePublished\":\"2021-09-04T23:36:14+00:00\",\"dateModified\":\"2023-09-23T12:07:54+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/coderx.com.cn\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/coderx.com.cn\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/coderx.com.cn\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"http:\/\/coderx.com.cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A\u80a1\u80a1\u7968\u5217\u8868\u4e0b\u8f7d\u2014\u2014\u4ece\u96f6\u5230\u5b9e\u76d82\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/coderx.com.cn\/#website\",\"url\":\"http:\/\/coderx.com.cn\/\",\"name\":\"Python\u91cf\u5316\u6280\u672f\u5206\u4eab-\u7801\u519c\u7532\u7684\u5b66\u4e60\u7b14\u8bb0\",\"description\":\"\u7801\u519c\u7532\u7684\u5b66\u4e60\u7b14\u8bb0\",\"publisher\":{\"@id\":\"http:\/\/coderx.com.cn\/#\/schema\/person\/4f9a19aed18c75500a890ab51b762ad3\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/coderx.com.cn\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/coderx.com.cn\/#\/schema\/person\/4f9a19aed18c75500a890ab51b762ad3\",\"name\":\"mnj\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/coderx.com.cn\/#\/schema\/person\/image\/\",\"url\":\"\/wordpress\/wp-content\/uploads\/2021\/09\/cropped-1-2.jpg\",\"contentUrl\":\"\/wordpress\/wp-content\/uploads\/2021\/09\/cropped-1-2.jpg\",\"width\":951,\"height\":189,\"caption\":\"mnj\"},\"logo\":{\"@id\":\"http:\/\/coderx.com.cn\/#\/schema\/person\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A\u80a1\u80a1\u7968\u5217\u8868\u4e0b\u8f7d\u2014\u2014\u4ece\u96f6\u5230\u5b9e\u76d82 - Python\u91cf\u5316\u6280\u672f\u5206\u4eab","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/coderx.com.cn\/","og_locale":"zh_CN","og_type":"article","og_title":"A\u80a1\u80a1\u7968\u5217\u8868\u4e0b\u8f7d\u2014\u2014\u4ece\u96f6\u5230\u5b9e\u76d82 - Python\u91cf\u5316\u6280\u672f\u5206\u4eab","og_description":"\u76ee\u524d\u5b9e\u76d8\u4e3b\u8981\u7528\u5230\u7684\u662fA\u80a1\u7684\u65e5\u7ebf\u6570\u636e\uff0c\u5728BaoStock\u3001Tushare\u3001AKShare\u7b49\u5e73\u53f0\u4e0a\uff0c\u5747\u80fd\u514d\u8d39\u4e0b\u8f7d\u65e5 ... \u9605\u8bfb\u66f4\u591a","og_url":"\/?p=57","og_site_name":"Python\u91cf\u5316\u6280\u672f\u5206\u4eab","article_published_time":"2021-09-04T23:36:14+00:00","article_modified_time":"2023-09-23T12:07:54+00:00","author":"mnj","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"mnj","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/coderx.com.cn\/#article","isPartOf":{"@id":"\/?p=57"},"author":{"name":"mnj","@id":"http:\/\/coderx.com.cn\/#\/schema\/person\/4f9a19aed18c75500a890ab51b762ad3"},"headline":"A\u80a1\u80a1\u7968\u5217\u8868\u4e0b\u8f7d\u2014\u2014\u4ece\u96f6\u5230\u5b9e\u76d82","datePublished":"2021-09-04T23:36:14+00:00","dateModified":"2023-09-23T12:07:54+00:00","mainEntityOfPage":{"@id":"\/?p=57"},"wordCount":93,"commentCount":1,"publisher":{"@id":"http:\/\/coderx.com.cn\/#\/schema\/person\/4f9a19aed18c75500a890ab51b762ad3"},"articleSection":["\u4ece\u96f6\u5230\u5b9e\u76d8"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/coderx.com.cn\/#respond"]}]},{"@type":"WebPage","@id":"\/?p=57","url":"http:\/\/coderx.com.cn\/","name":"A\u80a1\u80a1\u7968\u5217\u8868\u4e0b\u8f7d\u2014\u2014\u4ece\u96f6\u5230\u5b9e\u76d82 - Python\u91cf\u5316\u6280\u672f\u5206\u4eab","isPartOf":{"@id":"http:\/\/coderx.com.cn\/#website"},"datePublished":"2021-09-04T23:36:14+00:00","dateModified":"2023-09-23T12:07:54+00:00","breadcrumb":{"@id":"http:\/\/coderx.com.cn\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/coderx.com.cn\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/coderx.com.cn\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/coderx.com.cn\/"},{"@type":"ListItem","position":2,"name":"A\u80a1\u80a1\u7968\u5217\u8868\u4e0b\u8f7d\u2014\u2014\u4ece\u96f6\u5230\u5b9e\u76d82"}]},{"@type":"WebSite","@id":"http:\/\/coderx.com.cn\/#website","url":"http:\/\/coderx.com.cn\/","name":"Python\u91cf\u5316\u6280\u672f\u5206\u4eab-\u7801\u519c\u7532\u7684\u5b66\u4e60\u7b14\u8bb0","description":"\u7801\u519c\u7532\u7684\u5b66\u4e60\u7b14\u8bb0","publisher":{"@id":"http:\/\/coderx.com.cn\/#\/schema\/person\/4f9a19aed18c75500a890ab51b762ad3"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/coderx.com.cn\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"http:\/\/coderx.com.cn\/#\/schema\/person\/4f9a19aed18c75500a890ab51b762ad3","name":"mnj","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/coderx.com.cn\/#\/schema\/person\/image\/","url":"\/wordpress\/wp-content\/uploads\/2021\/09\/cropped-1-2.jpg","contentUrl":"\/wordpress\/wp-content\/uploads\/2021\/09\/cropped-1-2.jpg","width":951,"height":189,"caption":"mnj"},"logo":{"@id":"http:\/\/coderx.com.cn\/#\/schema\/person\/image\/"}}]}},"_links":{"self":[{"href":"http:\/\/coderx.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/57","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/coderx.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/coderx.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/coderx.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/coderx.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=57"}],"version-history":[{"count":25,"href":"http:\/\/coderx.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/57\/revisions"}],"predecessor-version":[{"id":516,"href":"http:\/\/coderx.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/57\/revisions\/516"}],"wp:attachment":[{"href":"http:\/\/coderx.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/coderx.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/coderx.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}