I follow this website and until the second last line, it works well.
I encounter a error during
sample_df = pd.read_csv(io.StringIO(uploaded['sa.csv'].decode('utf-8')))
sample_df.head()
For sample_df = pd.read_csv(io.StringIO(uploaded['sa.csv'].decode('utf-8')))
, it stated this:
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-44-c79110307396> in <module>()
----> 1 sample_df = pd.read_csv(io.StringIO(uploaded['sa.csv'].decode('utf-8')))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 2716736: invalid continuation byte
For sample_df.head()
, it stated this:
NameError Traceback (most recent call last)
<ipython-input-43-c589eab13420> in <module>()
----> 1 sample_df.head()
NameError: name 'sample_df' is not defined
Can someone help me pls with this problem?
question from:
https://stackoverflow.com/questions/65641084/how-do-you-access-your-csv-file-that-u-have-upload-in-google-colab 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…