'Python Program Output Exceeding Display Area (Default Run)

I'm learning Python and making a program that uses loops to scrape planetary positions through a sequence of 301 years, generating minute by minute timestamps for 1800 through 2100, modifying the date as it goes. I can see that the logic of the program is working fine so far, but the problem is when I open the file "name.py" and the black console comes up, the output exceeds the display area, I can see the tail end of the output but can't highlight and copy the entire set of outputs.

I have just been double clicking the "name.py" file and then a black console comes up with the following path at the top C:\WINDOWS\py.exe

Does anybody know any good environments to display the entire set of outputs or how I should go about making them available to me after I run my program?

How should I go about opening the file, or what concepts should I look into to export the outputs to a word file or something of the sort.

Or would you recommend I run my program in smaller increments?

Many thanks for any pointers.



Solution 1:[1]

generally for these interests pandas is a good library that its commonly used for loading or saving data from/to csvs.

for example, using

import pandas as pd
data = []

and lets say you have data1 data2 data3 for x timesteps, you can use

current_data = [data1, data2, data3]
data.append(current_data)
#x timesteps

andw when you are done with your experiment.

stats.to_csv('stats.csv', mode='a', index=False, header=False)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dharman