pandas 给某一列添加字符串

即可!

添加新的列:

data['m'] = data['code'].str[:4]

猜你喜欢

转载自www.cnblogs.com/yu121/p/12970262.html