ENH: option to export df to Stata dataset with value labels · Issue #38454 · pandas-dev/pandas (original) (raw)

One feature of Stata (.dta) datasets is that it's possible to have categorical columns with numerical values and string value labels. At the moment, df.to_stata doesn't have an option to create this kind of columns.

Describe the solution you'd like

It would be nice if df.to_stata could have a value_labels option that accepts a dictionary mapping numerical values to value labels.

API breaking implications

.

Describe alternatives you've considered

.

Additional context

.