I am having a numpy array of (200, 2000) and trying to convert it to a dataframe
of 200 columns and 2000 rows.
I already have a list of column names that I would like to use in the dataframe, but I am struggling with an index error.
Code:
indexes = range(len(features_bow)+1)
features_bow_df = pd.DataFrame(features_bow, index=indexes,columns=features_bow.shape)
#features_bow.shape is the set column names that I have in the form of a list.
Error:
ValueError: Shape of passed values is (200, 2000), indices imply (2, 2000)
Any help would be appreciable.