Poo
Poo

Reputation: 107

Remove character '\xa0' while reading CSV file in python

I want to remove the non-ASCII Character '\xa0' while reading my CSV file using read_csv into a dataframe with python. Can someone tell me how to achieve this?

Upvotes: 0

Views: 1157

Answers (1)

Denis Tereshchenko
Denis Tereshchenko

Reputation: 131

You can use x = txt.replace(u'\xa0', u'') for text you're reading.

Upvotes: 1

Related Questions