I'm having trouble removing all special characters from my pandas dataframe. Can you help me out?
I have tried something like this:
df = df.replace(r'\W+', '', regex=True)
because I've found it in a recent post. But when I execute, the special character " ' " for example doesn't disappear.
I know in PostgresSQL there is something like [^\w] to get a specific list. Is there something similar in python to do something like
a) keep only alphabet
b) keep only numbers
c) keep alphabet and numbers
Thank you for your help!