I output a large array into a text file in python. I then read it in excel to plot the data. Currently, the file I am writing is too large to read in excel.
I use file open and close functions and write the data in array ( please refer the code):
with open("abc.txt", "w") as file:
file.write(str(abc_value))
file.close()
Question: How can I split the data file so that after 1000000 steps (approximately), the file closes and starts writing to another file.
At the end, there should be multiple data files which I can read in excel separately.
Any leads much appreciated!