选择列的小时数和游戏时出错
我尝试了不同的代码,但是没有一个起作用。
import pandas as pd
import numpy as np
# upload the dataset to spyder
data = pd.read_csv("C:/Users/User/Documents/FYP II/gamedataset.csv")
# Data selection on columns needed for data mining
collect = data[['Game','Genre','price','Hours','Day.period','Age','Gender','Violence.Rate','Cause.gaming','CID.Rating',]]
我希望收集的数据集能够显示
我得到:
KeyError: "['Hours', 'Game'] not in index