Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (120 points)

I am trying to remove special characters from a string, but when I export the Pandas dataframe as a CSV, I can still see the special characters.

Does anyone know why that is?

Current Code:

document = json.dumps(jfile,default=str)
document2 = document.replace('£','').replace('$','').replace('','').replace('€','')
document2  = json.loads(document2)
document2.to_csv("test.csv", index = False)

image

Please log in to answer this question.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...