I have a Pandas Dataframe (dataset
, 889x4) and a Numpy ndarray (targets_one_hot
, 889X29), which I want to concatenate. Therefore, I want to convert the targets_one_hot
into a Pandas Dataframe.
To do so, I looked at several suggestions. However, these suggestions are about smaller arrays, for which it is okay to write out the different columns.
For 29 columns, this seems inefficient. Who can tell me efficient ways to turn this Numpy array into a Pandas DataFrame?