0

i Have an array of (200rows x 4 columns) and i want to save it into a .csv file i used the function savetxt() np.savetxt("myfile.csv", np.column_stack([time_axis[::1], outputdataEz[::1], outputdataHx[::1], outputdataHy[::1]]), delimiter=', ', fmt = '%1.50f')

and when I check the .csv file I found that all my data was successfully saved into a .csv File.

And now I want to use the same operation but using FileDialog: asksaveasfile as you can see in my code bellow

result = np.column_stack([time_axis[::1], outputdataEz[::1], outputdataHx[::1], outputdataHy[::1]])

print(result.shape)

print(result)

result = filedialog.asksaveasfile(mode='w', defaultextension=".csv")

When I check my file I found it empty. Any suggestions, please.

Thank you for your help.

Faizy
  • 120
  • 4
  • 14

0 Answers0