tomgranot / sentdexworkarounds Goto Github PK
View Code? Open in Web Editor NEWA workaround for part 22 of Sentdex's Python for Investing
A workaround for part 22 of Sentdex's Python for Investing
Thank you for this updated code. One issue I found on 22.py is that an N/A on the Yahoo finance key statistics website will be represented as a blank field in the json file. For example, ABBV has N/A for free cash flow, which is shown in the json file as "freeCashflow":{}. When downloading the dataframe to a csv file in teh code, the code defaults this to the next number it finds. In this case, freeCashflow would get populated with earningsGrowth, "freeCashflow":{},"operatingCashflow":{},"earningsGrowth":{"raw":0.278,"fmt":"27.80%"}. Any idea on how to fix this? I am struggling to figure it out.
I appreciate your help with this. after some digging, I was able to find market cap as sharesOutstanding
Price/Sales is priceToSalesTrailing12Months
as for trailing p/e the best i could figure is calculating it using by dividing 'currentPrice' by 'trailingEps'
You need to convert the values to floats before doing arithmetic in the append. Took me ages to work out what wasn't working.
Thanks for creating the workaround, one issue I had was the Market Cap data, you need to first convert value_list[35] into a float in order for it to work.
'Market Cap':float(value_list[35])*value_list[36]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.