df2=test[['Weight\n体重','Age
年龄']].fillna(test[['Weight\n体重','Age
年龄']].median())
mapping1 = {'south':1, 'east':2,'north':3,'west':4}
df['Region
区域'] = df['Region
区域'].map(mapping1)
df['区域']=df['区域'].replace({'north':1,'south':2,'east':3,'west':4})
转载请注明原文地址:https://blackberry.8miu.com/read-8412.html