📜  将熊猫分类数据转换为 numerica - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:25.378000             🧑  作者: Mango

代码示例2
#this will label as one hot vectors (origin is split into 3 columns - USA, Europe, Japan and any one place will be 1 while the others are 0)
dataset['Origin'] = dataset['Origin'].map({1: 'USA', 2: 'Europe', 3: 'Japan'})