【发布时间】:2016-05-09 16:39:17
【问题描述】:
将数据加载到数据框中并自动转换为分类变量时出现以下错误。
df = pd.read_csv(filepath_or_buffer=filename,
header=0,
index_col=False,
usecols=['col1', 'col2', 'col3'],
dtype={'col1': int,
'col2': 'category',
'col3': float})
TypeError:数据类型“类别”不理解
【问题讨论】:
标签: python pandas machine-learning