I have a numpy array with the following shape:
numpy_x.shape
(9982, 26)
I want turn this numpy to dataframe:
x_new_df = pd.DataFrame(numpy_x)
And my new dataframe is:
x_new_df
How to can I generate the dataframe with index and columns names?

x_new_df = pd.DataFrame(numpy_x, index=idx, columns=cols),idxandcolsare lists or 1d numpy arrays with same size asnumpy_x.shapeNameError: name 'idx' is not defined, Should I define some equvalence toidxandcolsor their values are accesed by default?x_new_df = pd.DataFrame(numpy_x, columns=cols)wherecolsare list ornumpy 1d array