When I try printing to screen, or saving to a text file, the output from downloading stocks through yfinance, it truncates the output like so:
Adj Close ... Volume
ADXS CHEK CLPS ... TUSK TYHT VOXX
Datetime ...
2020-01-28 07:00:00-05:00 0.7900 NaN NaN ... NaN NaN NaN
2020-01-28 08:00:00-05:00 0.8090 NaN NaN ... NaN NaN NaN
2020-01-28 09:00:00-05:00 0.7799 NaN NaN ... NaN NaN NaN
2020-01-28 09:30:00-05:00 0.7990 2.10 3.5000 ... 0.0 0.0 0.0
2020-01-28 10:30:00-05:00 0.7897 2.12 3.4283 ... 11931.0 27734.0 5196.0
... ... ... ... ... ... ... ...
2020-02-14 14:30:00-05:00 1.0300 1.73 3.1087 ... 10005.0 13814.0 14255.0
2020-02-14 15:30:00-05:00 1.0199 1.75 3.0800 ... 15483.0 6871.0 7046.0
2020-02-14 16:00:00-05:00 1.0100 NaN NaN ... 0.0 0.0 400.0
2020-02-14 17:00:00-05:00 1.0000 NaN NaN ... NaN 0.0 NaN
2020-02-14 18:00:00-05:00 1.0100 NaN NaN ... 0.0 NaN NaN
[215 rows x 156 columns]
Going from How to print the full NumPy array, without truncation? I tried adding:
np.set_printoptions(precision=3, suppress=True, threshold=np.inf)
#As well as
np.set_printoptions(precision=3, suppress=True, threshold=sys.maxsize)
While that will print large arrays, it still has no effect on the output.
I then tried doing a for loop and a for loop inside the for loop, but that just printed the titles.
Here is what I have for this part:
rangeOfDays=21
endDateRange= datetime.date.today()- datetime.timedelta(days=(rangeOfDays+1))
startDateRange= EndTestingDate - datetime.timedelta(days=(730-rangeOfDays))
timeBetweenDates = endDateRange- startDateRange
daysBetweenDates = timeBetweenDates.days
randomNumOfDays = random.randrange(daysBetweenDates)
randomDay= startDateRange + datetime.timedelta(days=randomNumOfDays)
lastDay=randomDay + datetime.timedelta(days=(dayRange))
#All of this is just the date stuff
StockNames =['LODE', 'CLPS', 'CNET', 'NXTD', 'PBTS', 'PETZ', 'GRNQ', 'PHCF', 'MTC', 'PCSA', 'TUSK']
Break=yf.download(StockNames, start=randomDay,
end=lastDay,
progress=True,
interval ='60m',
prepost=True,
threads=100)
Break.head()
print (Break)
Is there even a way to spread it out to print to the screen or save to a file the full amount?