Skip to content

.clean_names() should replace @ with _ #1257

@GegznaV

Description

@GegznaV

Brief Description

Consider the following example in which @ symbol is not converted into _ in Column@Three:

import pandas as pd
import janitor

df = pd.DataFrame({
    'Column One': [1, 2, 3],
    'Column-Two': [4, 5, 6],
    'Column@Three': [7, 8, 9],
})

df_cleaned = df.clean_names()
print(df_cleaned)
#>    column_one  column_two  column@three
#> 0           1           4             7
#> 1           2           5             8
#> 2           3           6             9

.clean_names() should replace @ with _ as it does in R:

janitor::make_clean_names("Column@Tree")
#> [1] "column_tree"

System Information

  • Operating system: Windows
  • OS details (optional): Windows 10
  • Python version (required): 3.9 and 3.11

Minimally Reproducible Code

See above

Error Messages

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions