我正在尝试使用 Pandas 加载数据集并以表格形式显示它们。但我不确定为什么不能使用分隔符将其分开。有人知道吗?
我使用的数据集:https://www.kaggle.com/tunguz/big-five-personality-test
答案 0 :(得分:1)
根据评论,这对我有用。避免手动下载问题的一种方法是自动下载
pip3 install kaggle
import kaggle.cli
import sys
from pathlib import Path
if not Path.cwd().joinpath("IPIP-FFM-data-8Nov2018/data-final.csv").exists():
sys.argv = [sys.argv[0]] + "datasets download tunguz/big-five-personality-test --unzip".split(" ")
kaggle.cli.main()
pd.read_csv(Path.cwd().joinpath("IPIP-FFM-data-8Nov2018/data-final.csv"), sep="\t")