It's not a normal dataFrame that easy to export.
To get DataFrame format to a file,can do a tricks bye using
To get DataFrame format to a file,can do a tricks bye using
.to_clipboard()
and catch the output.# Your DataFrame >>> cc 0 1 2 3 0 gridtype= curvilinear 1 gridsize= 9 2 xvals= -180 -175.0 -170.0 3 -180 -175.0 -170.0 4 -180 -175.0 -170.0 >>> cc.to_clipboard(index=False) >>> ccc = pd.io.clipboard.clipboard_get() # This is how test.txt will look >>> print(ccc) 0 1 2 3 gridtype= curvilinear gridsize= 9 xvals= -180 -175.0 -170.0 -180 -175.0 -170.0 -180 -175.0 -170.0 >>> with open("test.txt", "w") as f: ... print(ccc, file=f)