[pandas/io/stata.py] Importing option for importing specified columns from stata .dta files · Issue #7935 · pandas-dev/pandas (original) (raw)
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'])