#比如,把col_A中值为1的行对应的col_B替换成1
df.loc[df['col_A']==1, 'col_B'] = 1
dataframe怎么替换某个元素值
猜你喜欢
转载自blog.csdn.net/u_7890/article/details/83514823
今日推荐
周排行