I've got a numpy array and I want to rename its columns with the schematic:
sid | sx1...-sx2048 | I decided to use dict:
train_set.rename(columns = {0:'sid'}, inplace = True)
train_set.rename(columns=dict(zip(train_set.columns[1:2048],(np.full(2048,'sx' + str(indexes[0:2047]))))),inplace = True)
but of course it's wrong because now I've got columns with names sx[1....2048] sx[1...2048 and so on.
I've changed this line in different ways but either it didn't work or there was an error:
ufunc 'add' did not contain a loop with signature matching types (dtype('<U11175'), dtype('<U11175')) -> dtype('<U11175')
Can anyone has an idea how to do this using dict?
Thank you for your response!
Greetings Alex