Merging financial statements and filling missing values
You just learned about cash flow to net income and operating cash flow ratio. Recall that net income is not entirely earned in cash, and the cash flow to net income ratio tells us the rate of net income earned in cash. The operating cash flow ratio tells us whether the company has enough cash to meet its short-term commitments.
In this exercise, you'll compute both of these ratios for Apple and Microsoft and then plot them. A side-by-side plot of ratios of companies in the same industry helps visualize their differences.
You will usually get only some of the necessary information from different financial statements in any one DataFrame. You will likely get it from different sources and have to merge them. In addition, data from the wild often has missing values. This exercise involves filling in NaNs
and merging DataFrames.
A pandas DataFrame dataset
has been loaded for you. It contains information about Microsoft and Apple's income statements and balance sheets. Another pandas DataFrame cash_flow_statement
has also been loaded for you. This has some of Apple and Microsoft's cash flow information.
This exercise is part of the course
Analyzing Financial Statements in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Check the columns of dataset and cash_flow_statement
print(dataset.____)
print(cash_flow_statement.____)