JECSand / yahoofinancials

A powerful financial data module used for pulling data from Yahoo Finance. This module can pull fundamental and technical data for stocks, indexes, currencies, cryptos, ETFs, Mutual Funds, U.S. Treasuries, and commodity futures.
https://pypi.python.org/pypi/yahoofinancials
MIT License
899 stars 214 forks source link

Export YahooFinancials data into Excel #37

Closed flashgordon69 closed 4 years ago

flashgordon69 commented 4 years ago

Perhaps an easy question, but I am a beginner :-) How do I convert the data, received by the code below, into Excel

from yahoofinancials import YahooFinancials import datetime ticker = 'MCD' yahoo_financials = YahooFinancials(ticker) r = yahoo_financials.get_historical_price_data('2015-01-01', str(datetime.date.today()), 'monthly')

JECSand commented 4 years ago

Thanks for asking!

I would refer to the stack overflow question linked below:

https://stackoverflow.com/questions/23113231/write-dictionary-values-in-an-excel-file

Thanks for using YahooFinancials!

flashgordon69 commented 4 years ago

Hi JECSand

I tried the code, but I only receive the types of data, not the data itself. My code: [image: image.png]

And I receive an Excel-file with only: [image: image.png] What is wrong?

Greger

Den fre 13 sep. 2019 kl 20:20 skrev Connor Sanders <notifications@github.com

:

Thanks for asking!

I would refer to the stack overflow question linked below:

https://stackoverflow.com/questions/23113231/write-dictionary-values-in-an-excel-file

Thanks for using YahooFinancials!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JECSand/yahoofinancials/issues/37?email_source=notifications&email_token=ALB5QGMAVFNKRWFYZLTJHSLQJPKV3A5CNFSM4IUQQV5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6VZ4CI#issuecomment-531340809, or mute the thread https://github.com/notifications/unsubscribe-auth/ALB5QGLGUHFXKJE7AEPQG73QJPKV3ANCNFSM4IUQQV5A .