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
pragati asked 2 weeks 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
Fernando answered 2 weeks ago
Your Answer

9 + 13 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com