3D Numpy array to csv

I have created a collage as per instructions but how should i save it into a csv file.

Hey @Joy-Gupta-2763139277246091, you can simply use the df.to_csv() function to convert the pandas dataframe(your image) into your csv file.

Please Note : You will first have to convert your numpy array(image) into a pandas Dataframe.

I hope this clears your doubt !
Please mark the doubt as resolved in your doubts section ! :+1:
HappyLearning ! :slightly_smiling_face:


It requires a 2D numpy array but image itself is a 3D numpy array

Yes so you can do something like this :

img=img.reshape(184900,3)

I hope this helps !
Happy Learning ! :slightly_smiling_face:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.