Kizspy | Question: 20 (Choose 1 answer)
Traceback (most recent call last):
Suppose you are trying to read a file "temp.csv" using pandas and you get the following error.
File "<input>", line 1, in<module>
UnicodeEncodeError: 'ascii' codec can't encode character.
Which of the following would likely correct this error?
Note: pandas has been imported as pd
A. pd.read_csv("temp.csv", compression='gzip')
B. pd.read_csv("temp.csv", dialect='str')
C. pd.read_csv("temp.csv", encoding='utf-8')
D. pd.write_csv("temp.csv", encoding='utf-8')