代码:
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.
最佳答案
路径中不应使用空格;另外,您不应该使用 pd
作为变量名(记住,您已将 pandas 导入为 pd
),此外,就像现在一样,您正在请求未定义的数据帧 df
的 head()
。
尝试使用
df = quandl.get('BATS/BATS_GOOGL')
关于python - url NotFoundError 与 quandl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58565534/