import pandas
df = pd.DataFrame({
'Age':[33,44,22,44,55,22],
'Income':['Low','Low','High','Medium','Medium','High']})
df
df.Income=df.Income.map({'Low':1,'Medium':2,'High':3})
df
pandas替换列值+1
猜你喜欢
转载自blog.csdn.net/sinat_23971513/article/details/105268114
今日推荐
周排行