There is a multi-line multi-column csv file called da_all (this time 12170), but it takes a lot of time because I manually re-shaped it every time after making it into a single column with label in the following program.Is there a way to substitute 12 or 170 using da_all?
da_all1=np.ravel(da_all)[None,:].T
sc=StandardScaler()
data_del_stand=sc.fit_transform(da_all1)
data=scaler.transform(data_del_stand)
data=data.T.reshape (12,170)
If you want to return to the same shape, why don't you use numpy.ndarray.shape to get the number of dimensions and elements and specify it when numpy.reshape before processing?
Obtain and record orgshape=da_all.shape####shape
da_all1 = np.ravel(da_all) [None, :].T
sc=StandardScaler()
data_del_stand=sc.fit_transform(da_all1)
data=scaler.transform(data_del_stand)
specified at data=data.T.reshape(orgshape)####reshape
578 Understanding How to Configure Google API Key
582 PHP ssh2_scp_send fails to send files as intended
917 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
620 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.