Search code examples
pythonquandl

Downloading metadata from quandl.com with python, and getting no values with my fields?


I copied this code from quandl.com. I want to get the dataset specifics like is this data set data frequency Daily, Weekly, or Monthly. When I run the code I get the field names but no values, but if I try to load a csv file from quandl directly with out using python then I get what I need. I am not for sure why this won't work in python??

This is the code copied from https://www.quandl.com/docs/api?python#get-metadata

import quandl

metadata = quandl.Dataset("BOE/XUDLADS").data_fields()

print(metadata)

This is my output

['refreshed_at', 'premium', 'id', 'name', 'database_code', 'newest_available_date', 'frequency', 'description', 'oldest_available_date', 'type', 'column_names', 'dataset_code', 'database_id']

I get the field names but no values

when I just use this link, and not python I get exactly what I need https://www.quandl.com/api/v3/datasets/WIKI/FB/metadata.csv"

My ultimate goal is to store this metadata in a python dict()


Solution

  • The metadata is an attribute of the data itself. So you will have to get the data and then get to the metadata, as follows:

    metadata = quandl.Dataset("BOE/XUDLADS").data().meta
    

    I hope this helps.