I am looking at someones code and this is what they wrote
from financetoolkit import Toolkit
API_KEY = '<my API key from https://site.financialmodelingprep.com/>'
companies = Toolkit(["AAPL", "MSFT", "GOOGL", "AMZN"], api_key=API_KEY, start_date="2005-01-01")
income_statement_growth = companies.get_income_statement(growth=True)
display(income_statement_growth.loc[:, "Revenue", :])
Essentially what this code does is it returns the revenue value for a couple of companies starting from 2005 until present day.
What I am confused about is income_statement_growth.loc[:, "Revenue", :]
why is there three arguments? I dont understand what the third colon is doing in this code
All the documentation I read about .loc states that it takes two arguments, one for the row and one for the column, so I am a bit confused how it is able to take three and what the function of the third colon is.
documentation to financetoolkit package(ctrl f income_statement_growth.loc[:, "Revenue", :]
) to find exact spot
https://github.com/JerBouma/FinanceToolkit/blob/main/examples/Finance%20Toolkit%20-%201.%20Getting%20Started.ipynb
Jermiah smith is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3