0

I have a list of arrays that I would like to save it in a CSV file so that each array is a column and each value inside of the array is a raw. Thanks!

[array([1. , 0.98667283, 0.93550512, 0.9101134 , 0.86350843, 0.81362023, 0.79597313, 0.78630291, 0.76510444, 0.75112696,]), array([1. , 0.93300358, 0.82632603, 0.75321894, 0.68761633, 0.62084654, 0.54310758, 0.5185884 , 0.50324798, 0.47731232, array([1. , 0.97515355, 0.8841753 , 0.76284806, 0.76663915, 0.733638 , 0.74516099, 0.70097266, 0.70757977, 0.70645296,])]

Iva
  • 45
  • 5
  • 1
    Does this answer your question? [How to write List of lists in csv file in python](https://stackoverflow.com/questions/19575456/how-to-write-list-of-lists-in-csv-file-in-python) – sushanth May 16 '20 at 16:23
  • you can use `np.savetxt("filename.csv", np.stack( your_list, axis=1 ), delimiter=",")`, by using numpy (`np`) – Shijith May 16 '20 at 16:28
  • I get this error ..ValueError: all input arrays must have the same shape – Iva May 16 '20 at 16:51

0 Answers0