Prediction_final = np.argmax(results, axis=0)[0]
output = pd.DataFrame(Prediction_final.T)
The code above takes a numpy array, finds the argmax, and then converts it into a Pandas data frame for export. Unfortunately, a value error is raised when I do this:
Traceback (most recent call last):
File "svm_own.py", line 106, in <module>
output = pd.DataFrame(Prediction_final.T)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/pandas/core/frame.py", line 404, in __init__
raise ValueError('DataFrame constructor not properly called!')
ValueError: DataFrame constructor not properly called!
I've been trying to debug this, but have not found why this error occurs. Any thoughts?