Try to search your question here, if you can't find : Ask Any Question Now ?

How to remove non UTF-8 characters from a data frame

HomeCategory: stackoverflowHow to remove non UTF-8 characters from a data frame
Avatarpragati asked 3 months ago

I have a file some crazy stuff in it. It looks like this:
enter image description here

I attempted to get rid of it using this:

df['firstname'] = map(lambda x: x.decode('utf-8','ignore'), df['firstname'])

But I wound up with this in my dataframe:

I got that example from another question and this seems to be the Python3 method for doing this but I’m not sure what I’m doing wrong.

1 Answers
Best Answer
AvatarFernando answered 3 months ago
Your Answer

17 + 12 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com