awswrangler.catalog.sanitize_column_name

awswrangler.catalog.sanitize_column_name(column: str) → str

Convert the column name to be compatible with Amazon Athena.

https://docs.aws.amazon.com/athena/latest/ug/tables-databases-columns-names.html

Possible transformations: - Strip accents - Remove non alphanumeric characters - Convert CamelCase to snake_case

Parameters

column (str) – Column name.

Returns

Normalized column name.

Return type

str

Examples

>>> import awswrangler as wr
>>> wr.catalog.sanitize_column_name('MyNewColumn')
'my_new_column'