URL 未找到错误和quand

2024-10-03 21:23:57 发布

您现在位置:Python中文网/ 问答频道 /正文

代码:

import pandas as pd

import quandl
quandl.ApiConfig.api_key = 'wsnt2aKcnkNMJjdqqwTz'

pd = quandl.get('BATS / BATS_GOOGL')

print(df.head())

错误:

NotFoundError: (Status 400) (Quandl Error QECx01) We could not recognize the URL you requested: /api/v3/datasets/BATS / BATS_GOOGL/data. Please check your URL and try again.


Tags: key代码importapiurlpandasgetas
1条回答
网友
1楼 · 发布于 2024-10-03 21:23:57

您不应该在路径中使用空格;而且,您应该而不是使用pd作为变量名(请记住,您已经将pandas作为pd导入),另外,正如现在一样,您要求的是没有定义的数据帧head()。你知道吗

尝试

df = quandl.get('BATS/BATS_GOOGL')

相关问题 更多 >