Skip to content

KeyError: 'structure' for OECD #997

Description

@r-matsuzaka

Issue

I just followed the documentation.
But it does not work.

import pandas_datareader.data as web

import datetime

df = web.DataReader('TUD', 'oecd')

print(df.columns)


df[['Japan', 'United States']]

Result

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
[<ipython-input-7-9b54b41f1ad6>](https://localhost:8080/#) in <cell line: 5>()
      3 import datetime
      4 
----> 5 df = web.DataReader('TUD', 'oecd')
      6 
      7 print(df.columns)

5 frames
[/usr/local/lib/python3.10/dist-packages/pandas_datareader/io/jsdmx.py](https://localhost:8080/#) in read_jsdmx(path_or_buf)
     42         data = json.loads(jdata, object_pairs_hook=OrderedDict)
     43 
---> 44     structure = data["structure"]
     45     index = _parse_dimensions(structure["dimensions"]["observation"])
     46     columns = _parse_dimensions(structure["dimensions"]["series"])

KeyError: 'structure'

Ref

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions