Reputation: 70
I have a csv file that has extended ASCII characters like -> "Néw" , when I try to read this file and output the rows I get special character for e.g the above becomes -> "N�w".
I am using below command to read the file
df = pd.read_csv("temp.csv")
df.head(5)
Upvotes: 1
Views: 366
Reputation: 764
read_csv has a parameter 'encoding' which you would need to add to your code to get the string in text correctly .
Could you try using below and check if it works
df = pd.read_csv("temp.csv", encoding='utf-8')
df.head(5)
For checking list of all standard python encoding check this link- here
Upvotes: 1