dr-leo / pandaSDMX

Python interface to SDMX
Apache License 2.0
129 stars 60 forks source link

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

Open camilo-s opened 1 year ago

camilo-s commented 1 year ago

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