Instagram style photo collage

I have completed the code now how to convert it into csv file

Hey @shivani_jainEtW, lets say your final variable named ‘ans’ contains the final image.

Proceed further like this, to make the csv,

import pandas as pd
ans = ans.reshape((-1,3))
pd.DataFrame(ans).to_csv(‘myfile.csv’, index = False, header = [‘r’,‘g’,‘b’])

Make sure you specify header only if its in sample submission file, also make sure header values are same as to that in sample submission file.

Hope this resolved your doubt. :blush:

1 Like

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.