I saved a pandas dataframe as a csv using
df_to_save.to_csv(save_file_path)
but when I read it back in using
df_temp = pd.read_csv(file_path)
I get an error message saying
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbf in position 158: invalid start byte
I've tried forcing the encoding on reading it to be utf-8 by opening the csv file with
df_temp = pd.read_csv(file_path, index_col=False, encoding="utf-8",sep=',')
Really stuck, can anyone help?
Many thanks