Skip to content

[pandas/io/stata.py] Importing option for importing specified columns from stata .dta files #7935

Closed
@sanguineturtle

Description

@sanguineturtle

It would be great if a columns option could be added to the Stata Reader. Some dta files can be large and I would like to import a few specified columns. Current I am importing the entire file and returning a selection such as:

data = pd.read_stata(fn)[['year', 'exports']]

I would propose pd.read_stata(fn, columns=['year', 'exports'])

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions