Replies: 3 comments 1 reply
-
Pandas DF output suggestion from @SymbReprUnlim |
Beta Was this translation helpful? Give feedback.
-
Hi Connor, I've successfully retrieved quarterly and annual income statements using yahoofinancials v1.12 and converted them into Pandas Dataframes, (Python code shown below). I've inserted both the Python 3.7 "py" program AND console output with Dataframe results into this posting. Actual Python code indentation likely does not show up correctly and apparently *.py programs cannot be attached to github comments, so everything had to be copied and pasted as per the below. Also "type(...).name" may not be showing up correctly - the underscores seem to disappear(e.g. underscore-underscore name underscore-underscore in actual Python code) - likely an html/Python translation/viewing quirk. Python program: import datetime, copy def df_create_cols(sCSV_or_vecColLabels): # create empty pandas dataframe with column headers ["colhdr1","colhdr2",...] def df_append_row(df_in,vecVals,boolMultipleRows=False): # append a list to a pandas dataframe as new row(s) def nested_list2df(listColHdrs,listNestedVals): # pprt nested list as ret'd df_; create pandas dataframe df_ from hdrs_list & nested_list_of_data_rows; if listColHdrs=[] it uses col_hdrs = listNestedVals[0] def dict_get_nth_key(dict_in, i_key_n=0): # get the nth key (0...n-1) in a dictionary def get_inc_stmts(sSymb,s_freq="q"): # retrieve/get quarterly or annual income statements for a ticker symbol using yahoofinancials/yfin #------------------------------- Main Program Starts Here ------------------------------- Console output (Pandas dataframe columns shown below correctly line up within a Linux Terminal/Console):
|
Beta Was this translation helpful? Give feedback.
-
Closing this discussion today, but here are the planned features for v2.0:
|
Beta Was this translation helpful? Give feedback.
-
Some ideas I have for v2.0 of yahoofinancials:
I also welcome the inclusion of any additional ideas for v2.0. Please feel free to add them to this discussion. I'd live to have v2.0 in production sometime in Q2 of this year.
Beta Was this translation helpful? Give feedback.
All reactions