Skip to main content
`Ctrl`+`K`

# pandas.errors.InvalidColumnName

exception pandas.errors.InvalidColumnName

  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.

  Examples

      >>> df = pd.DataFrame({"0categories": pd.Series([2, 2])})
      >>> df.to_stata('test')
      ... # InvalidColumnName: Not all pandas column names were valid Stata variable...