需求
将两列string类型的数据拼接为新的一列;
原始数据如下:

解决
借助于 pandas.DataFrame.field.str.cat()
df['deliveryPrice'].str.cat(df['deliveryMonth']).str.upper()

Original: https://www.cnblogs.com/bigtreei/p/14661271.html
Author: ZhuGaochao
Title: pandas 拼接两列string类型数据为新的一列 df.str.cat()
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/9120/
转载文章受原作者版权保护。转载请注明原作者出处!