Writing dict to CSV with a large numpy array

  csv, paraview, python

I got following dict structure:

alldata['VarName'][VTKArray]

According to paraview manual the VTKArray is exactly a numpy array. Now when writing this to a csv I do following:

 with open('file.csv','w') as f:
      write= csv.write(f)
      for k,v in alldata.items()
            write.writerow([k,v])

The problem I have is that my file looks something like:

 T,"[12 
     14
     15 ...,
     14 
     12 
     12]"

It is truncating the numbers. The actual length of the array is 1000

Source: Python Questions

LEAVE A COMMENT