需求

将两列string类型的数据拼接为新的一列;

原始数据如下:

pandas 拼接两列string类型数据为新的一列 df.str.cat()

 解决

借助于 pandas.DataFrame.field.str.cat()

df['deliveryPrice'].str.cat(df['deliveryMonth']).str.upper()

pandas 拼接两列string类型数据为新的一列 df.str.cat()

 

相关文章:

  • 2021-11-19
  • 2021-12-09
  • 2021-08-04
  • 2022-12-23
  • 2021-10-31
  • 2022-01-16
  • 2022-12-23
猜你喜欢
  • 2021-08-26
  • 2022-12-23
  • 2022-12-23
  • 2022-03-09
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案