You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the utility function pythonify_column_names(df) introduced in commit b49085b makes a good initial effort for translating all column names to valid python identifiers, column names starting with numerals remain invalid.
As valid python identifier column names are effectively required to properly use f.ex. the HDF5 format with Pandas, these column names, too, should be made valid.
I believe a good initial solution is to add an argument to pythonify_column_names(df), so that the new signature is pythonify_column_names(df, number_prefix=None). The new argument number_prefix would then be prepended to all column names starting with a number, provided that it is not None.
The text was updated successfully, but these errors were encountered:
While the utility function
pythonify_column_names(df)
introduced in commit b49085b makes a good initial effort for translating all column names to valid python identifiers, column names starting with numerals remain invalid.As valid python identifier column names are effectively required to properly use f.ex. the HDF5 format with Pandas, these column names, too, should be made valid.
I believe a good initial solution is to add an argument to
pythonify_column_names(df)
, so that the new signature ispythonify_column_names(df, number_prefix=None)
. The new argumentnumber_prefix
would then be prepended to all column names starting with a number, provided that it is notNone
.The text was updated successfully, but these errors were encountered: