Skip to content
Advertisement

Yahoo Finance API yf.Ticker(ticker).info to CSV problem

When I’m using

JavaScript

I get a dataframe in response

When I use

JavaScript

I’m receiving a list from Yahoo finance API. How can I transform this list to a Dataframe in Pandas? So I could use

JavaScript

How can I save yf.Ticker(ticker).info data to a csv?

enter image description here

JavaScript

I don’t understand how I can change this list into something I can write to CSV

JavaScript

This is the full response from Yahoo Finance API from which I only need ‘freeCashflow’, ‘industry’, ‘debtToEquity, ‘returnOnEquity’, ‘sharesOutstanding’ to CSV

JavaScript

This code returns an empty df but I can see the columns. 154 columns but 0 rows??? I should have 1 row of data.

enter image description here

Advertisement

Answer

I fixed it using

JavaScript

Thanks anyway :-)

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement