url quandl 的 NotFoundError

url NotFoundError with quandl

代码:

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),再加上,就像现在一样,您要求的是未定义的数据帧 dfhead()

试试

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