iraspin
(Iraspin)
May 27, 2025, 8:02pm
1
C:\Temp\StocksToTrack.txt
with open(“C:/Temp/StocksToTrack.txt”, ‘r’) as file:
content = file.read()
chunks = content.split(‘,’)
for element in chunks:
#print (f"Element: {element}“)
ticker = yf.Ticker(f”{element}“)
temp = ticker.history(‘5y’)
temp.to_csv(“C:/Temp/StocksHistoricalPrices/” + f”{element}" + “.csv”)
aterrel
(Andy Terrel)
May 28, 2025, 2:48am
2
Hi @iraspin !
First, please quote your code so it’s easier to read. See About the Python Help category
Second, this forum is for Python help but your question is about a library that is not maintained here. You should report your bug at GitHub · Where software is built