Converting a column within pandas dataframe from int to string

前端 未结 5 1434
南笙
南笙 2020-11-29 17:17

I have a dataframe in pandas with mixed int and str data columns. I want to concatenate first the columns within the dataframe. To do that I have to convert an int

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-29 17:45

    Use the following code:

    df.column_name = df.column_name.astype('str')
    

提交回复
热议问题