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 column to str. I've tried to do as follows:
mtrx['X.3'] = mtrx.to_string(columns = ['X.3'])
mtrx['X.3'] = mtrx['X.3'].astype(str)
but in both cases, it's not working and I'm getting an error saying "cannot concatenate 'str' and 'int' objects". Concatenating two str columns is working perfectly fine.