pandas.errors.InvalidColumnName — pandas 3.0.0.dev0+2105.g29e01463a6 documentation (original) (raw)

exception pandas.errors.InvalidColumnName[source]#

Warning raised by to_stata the column contains a non-valid stata name.

Because the column name is an invalid Stata variable, the name needs to be converted.

See also

DataFrame.to_stata

Export DataFrame object to Stata dta format.

Examples

df = pd.DataFrame({"0categories": pd.Series([2, 2])}) df.to_stata("test")