Skip to content

ENH: Make metadata from read_spss available  #34682

Closed
@mario-bermonti

Description

Is your feature request related to a problem?

I would like to have the metadata that pyreadstats provides available when reading files from SPSS.

This would be really helpful because it would provide an easy way to have variable labels (descriptions), value labels, and other important metadata available to format results/reports (by replacing the variable names manually with .replace function).

Those kinds of metadata are widely used in social sciences because it makes understanding results really easy. For example, SPSS changes the variable names to the variable labels in the output of analyses. Users could manually do this if the metadata was available.

Describe the solution you'd like

The metadata read by pyreadstats could be stored in the df's _metadata attribute and that would make it readily available

API breaking implications

I don't think there would be any implications if it's stored in the _metadata attribute because it was developed for this kind of use-case. I'm I right?

Describe alternatives you've considered

I could use the pyreadstats directly without using the df.read_spss. I can't think of any other options.

Additional context

This is related to issues #11179 and #39.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Closing CandidateMay be closeable, needs more eyeballsEnhancementIO DataIO issues that don't fit into a more specific labelmetadata_metadata, .attrs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions