正确写法
con_data.loc[con_data.product_inner_type == 'XJB' , 'M_class' ] = 'gongmu'
不报错但是没有效果的写法,如下两种:
1 con_data[con_data.product_inner_type == 'XJB'][ ' M_class ' ] = '1' 2 con_data[con_data.product_inner_type == 'XJB'].loc[ ' M_class ' ] = '1'
正确写法
con_data.loc[con_data.product_inner_type == 'XJB' , 'M_class' ] = 'gongmu'
不报错但是没有效果的写法,如下两种:
1 con_data[con_data.product_inner_type == 'XJB'][ ' M_class ' ] = '1' 2 con_data[con_data.product_inner_type == 'XJB'].loc[ ' M_class ' ] = '1'
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。