pandaSDMX icon indicating copy to clipboard operation
pandaSDMX copied to clipboard

No attributes despite `attributes = 'o'` in `pandasdmx.writer.pandas.write_dataset`

Open camilo-s opened this issue 1 year ago • 0 comments

Hi, I'm trying to get a Pandas dataframe including observation attribute OBS_FLAG from the ESTAT source by setting the attributes parameter to 'o' at the write_dataset method. However, the method returns the same dataframe as it would with no attribute explicitly declared.

Is this intended? If not, I'd be happy to contribute to the project.

Here's my code:

import pandasdmx as sdmx

session = sdmx.Request(self.agency_id)
data = session.get(resource_type='data', resource_id='EI_BSIN_M_R2')
df = sdmx.to_pandas(data.data[0], attributes='o')

Here's what the resulting df looks like Screenshot 2023-05-31 at 00 45 11

camilo-s avatar May 30 '23 22:05 camilo-s