51909/unicodedecodeerror-codec-decode-position-unexpected-data
country= pd.read_csv("C:\\Edureka\\Python\\02_toupload\\worldcities.csv",index_col = 0)
Giving me
UnicodeDecodeError: "utf-8" codec can"t decode byte 0xeb in position 8: unexpected end of data
How to fix this?
To read this dataset use encoding as latin1 below is the reference you can use:
data=ps.read_csv(r"C:\Users\akashkumar\Downloads\02_toupload_wub8x\02_toupload\worldcities.csv",encoding='latin1')
Thanks, its helpful to use
encoding='latin1'
Thanks, This answer was helpful. READ MORE
Hi, @hala, Regarding your query, you can go ...READ MORE
Hey, @Himanshu. It's still most likely gzipped data. ...READ MORE
my code import wordcloud import numpy as np from matplotlib ...READ MORE
You can also use the random library's ...READ MORE
Syntax : list. count(value) Code: colors = ['red', 'green', ...READ MORE
Enumerate() method adds a counter to an ...READ MORE
You can simply the built-in function in ...READ MORE
You have to use the encoding as latin1 ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.