68668/how-to-convert-1d-array-into-2d-array-using-pandas
Hi Guys,
I am trying to create one CNN model. I have my image pixels in 1D array. But I want to read that image. So I have to convert that 1D array into 2D array. How can I do that?
Hi@akhtar,
You can follow the below given codes to do this task.
import numpy as np img = np.asanyarray(1D_array) img.shape (784,) img1 = img.reshape((28,28)) img1.shape (28,28)
Hope this will help.
Hi, There is a problem with your X ...READ MORE
The standard glm function can be used ...READ MORE
Have a look at this one: from sklearn.datasets ...READ MORE
The predict() function returns a plain numpy ...READ MORE
Hi@akhtar, You have used unit8 in your code. ...READ MORE
So< if your error says: ...READ MORE
You can read excel files df = pd.read_excel(...) You ...READ MORE
Try something like this: df.values array([[nan, 0.2, nan], ...READ MORE
Hi@akhtar, You can do this task using pandas ...READ MORE
Hi@akhtar, According to your code, you are trying ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.