Skip to content

fix DeprecationWarning: escape sequences for normalize_string() #10

@f-hafner

Description

@f-hafner

DeprecationWarning for normalize_string():

src/dataprep/helpers/functions.py:41
  /home/flavio/projects/mag_sample/src/dataprep/helpers/functions.py:41: DeprecationWarning: invalid escape sequence \w
    s = s.replace("[^\w\d]", " ", regex = True)

src/dataprep/helpers/functions.py:42
  /home/flavio/projects/mag_sample/src/dataprep/helpers/functions.py:42: DeprecationWarning: invalid escape sequence \s
    s = s.replace("\s+", " ", regex = True)

these should be replaced with r"[^\w\d]" and with r"\s+" respectively.

see also here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions