代码拉取完成,页面将自动刷新
import os
import time
import pandas as pd
import akshare as ak
import warnings
from datetime import timedelta, datetime
warnings.filterwarnings("ignore")
pd.set_option('max_rows', None)
pd.set_option('max_columns', None)
pd.set_option('expand_frame_repr', False)
pd.set_option('display.unicode.ambiguous_as_wide', True)
pd.set_option('display.unicode.east_asian_width', True)
# 输入参数
adj="hfq" # 复权类型:None未复权 qfq前复权 hfq后复权
period = "1" # 周期可选:1, 5, 15, 30, 60 分钟的数据频率。
# 利用东财实时行情数据接口获取所有股票代码接口
df=ak.stock_zh_a_spot()
code_list=df[['序号','代码','名称']].values
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。