我正在尝试从以下位置下载json数据:link
json数据分为“pjtj:”、“jgyc:”、“mgsy:”……等类别
我的代码返回:
ValueError: arrays must all be same length
如何仅提取“mgsy:”类别下的数据
我的代码:
url = "http://emweb.securities.eastmoney.com/ProfitForecast/ProfitForecastAjax?code=SZ002439"
df = pd.read_json(url)
print(df)
Tags:
您可以尝试使用json的中间步骤,下面是一个示例:
这将返回一个包含json信息的数据帧。希望它能帮助你
一种选择是使用}:
requests
和json
下载并提取json
数据,然后将其转换为pandas
{相关问题 更多 >
编程相关推荐