from google.colab import files
uploaded = files.upload()
tweets = pd.read_csv(io.StringIO(uploaded['Tweets.csv']).decode('utf-8'), sep = ';')
我正在尝试导入我的数据,但出现以下错误:
initial_value must be str or None, not bytes
要给出评论中暗示的完整答案,应该是:
from google.colab import files
import pandas as pd
import io
uploaded = files.upload()
df = pd.read_csv(io.BytesIO(uploaded[`Tweets.csv`]))