I try to create new columns in my DataFrame 'self.__transformed' by copying some columns of 'self.__original'
self.__transformed[new_col] = self.__original[col]
However I get this error:
ValueError: Wrong number of items passed 2, placement implies 1
new_col
and col
are lists of column names
This : print(len(col), len(new_col))
returns: 45 45
By doing display(self.__original[col])
I see my 45 columns without anything special.
I don't understand what can be the possible reason of this error as I have the same numbers of columns. In particular I don't understand why passed 2
because I have 45 columns, not 2 !?