how to remove headers/meta data of JSON using Python
Question: I'm learning Python-JSON. Ive been trying to pull data from Quandl API, I was
successful in loading the data, but when i've tried to convert it to a Python
Dict, Its throwing a ValueError !

    
    
        ValueError                                Traceback (most recent call last)
    
     <ipython-input-10-0b58998505ee> in <module>()
    ----> 1 data=dict(data)
    
    ValueError: dictionary update sequence element #0 has length 1; 2 is required
    

The Below is my code,

    
    
    import json,urllib2
    url = "https://www.quandl.com/api/v3/datasets/NASDAQOMX/NQASIA0001LMGBPT.json"
    loaded = urllib2.urlopen(url).read()
    data = json.loads(loaded)
    type(data) # shows string
    data=dict(data) # here i'm getting value error
    

this's how the Data looks like

    
    
      {"dataset":{"id":12835494,"dataset_code":"NQASIA0001LMGBPT","database_code":"NASDAQOMX","name":"NASDAQ Asia Oil \u0026 Gas Large Mid Cap GBP TR Index (NQASIA0001LMGBPT)","description":"  \u003cp\u003eThe comprehensive NASDAQ Global Index Family covers international securities segmented by geography, sector, and size. NASDAQ OMX's transparent and rules-based selection method results in a complete representation of the global investable equity marketplace. The indexes cover 45 individual countries within Developed and Emerging Markets, and facilitate a multitude of tracking, trading, and investing opportunities.\u003c/p\u003e\n  \u003cp\u003e\u003cb\u003eComponents:\u003c/b\u003e \u003ca href=https://indexes.nasdaqomx.com/Index/Weighting/NQASIA0001LMGBPT\u003e40\u003c/a\u003e\u003c/p\u003e\n  \u003cp\u003e\u003cb\u003eCurrency:\u003c/b\u003e GBP\n  \u003cp\u003e\u003cb\u003eEntitlements:\u003c/b\u003e \u003ca href=https://indexes.nasdaqomx.com/Index/Overview/NQASIA0001LMGBP\u003eNASDAQ Global Index Family\u003c/a\u003e\u003c/p\u003e\n  \u003cp\u003e\u003cb\u003eTotal Market Value:\u003c/b\u003e is the sum of the market value of all companies in the index.\u003c/p\u003e\n  \u003cp\u003e\u003cb\u003eDividend Market Value:\u003c/b\u003e is the sum of the market value of all dividends generated by companies in the index. \u003c/p\u003e\n  \u003cp\u003e\u003cb\u003eTerms of Use:\u003c/b\u003e This data cannot be republished or used as the basis of a financial product without the permission of Nasdaq OMX.\u003c/p\u003e\n\n","refreshed_at":"2016-03-05T02:26:29.308Z","newest_available_date":"2016-03-04","oldest_available_date":"2001-03-30","column_names":["Trade Date","Index Value","High","Low","Total Market Value","Dividend Market Value"],"frequency":"daily","type":"Time Series","premium":false,"limit":null,"transform":null,"column_index":null,"start_date":"2001-03-30","end_date":"2016-03-04","data":[["2016-03-04",901.68,901.68,901.68,120990409547.0,10184040.0],["2016-03-03",888.22,888.22,888.22,119195278884.0,74919059.0],["2016-03-02",876.66,876.66,876.66,117717482960.0,0.0],["2016-03-01",861.69,861.69,861.69,115706487736.0,31420802.0],["2016-02-29",840.1,840.1,840.1,112838933060.0,0.0],["2016-02-26",856.96,856.96,856.96,115103827172.0,0.0],["2016-02-25",836.8,836.8,836.8,112395722181.0,43584397.0],["2016-02-24",846.48,846.48,846.48,113739936161.0,29138803.0],["2016-02-23",846.58,846.58,846.58,113782545450.0,0.0],["2016-02-22",839.75,839.75,839.75,112864607315.0,0.0],["2016-02-19",833.0,833.0,833.0,111957089747.0,0.0],["2016-02-18",832.63,832.63,832.63,111907945844.0,0.0],["2016-02-17",808.34,808.34,808.34,108642319107.0,0.0],["2016-02-16",821.18,821.18,821.18,110368331892.0,7742456.0],["2016-02-15",801.89,801.89,801.89,107783839163.0,0.0],["2016-02-12",770.54,770.54,770.54,103569144401.0,0.0],["2016-02-
    

I think I'm missing something here, do i've to do anything with URL, passing
parameters? or is there any step I've to include before data=dict(data) ?

I've checked StackOverFlow before posting this question, I was't successful, I
did google, every site I've clicked on are using Quandl package,(link below)
#Quandl(dataset)

any description/tutorial would make me understand this better. Thanks for your
time.

PS: I want to do this without using pandas and any other libraries.

Thank you,

[Retrieving data from Quandl with
Python](http://stackoverflow.com/questions/30550177/retrieving-data-from-
quandl-with-python)


Answer: Use `requests`:

    
    
    import json, requests
    url = "https://www.quandl.com/api/v3/datasets/NASDAQOMX/NQASIA0001LMGBPT.json"
    data = requests.get(url).json()
    print(data)
    

