Skip to content

Is io.sql._SAFE_NAMES_WARNING still relevant? #44295

Closed
@awisse

Description

@awisse

Is your feature request related to a problem?

When I try to dump a DataFrame which has spaces in columns into an SQLite database, I get the _SAFE_NAMES_WARNING. However, spaces in column names are no longer changed to underscores since version 0.14. This warning should be removed. IMHO it is no longer relevant.

Describe the solution you'd like

Remove the following lines from io/sql.py in function SQLiteTable._create_table_setup:

        pat = re.compile(r"\s+")
        column_names = [col_name for col_name, _, _ in column_names_and_types]
        if any(map(pat.search, column_names)):
            warnings.warn(_SAFE_NAMES_WARNING, stacklevel=6)

API breaking implications

None

Describe alternatives you've considered

None

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions