Aan de slagGa gratis aan de slag

Merging financial statements

You just learned to read JSON data into Python and compute two ratios from the cash flow statement. Computing the cash flow to net income ratio and operating cash flow ratio not only needs information from a company's cash flow statement, but also the income statement and balance sheet.

In this exercise, you'll practice loading JSON data into Python using pandas and merging it with the income statement and balance sheet data.

pandas has already been loaded for you as pd. The datasets with balance sheet and income statement information are called balance_sheet and income_statement, respectively. These have also been loaded for you.

Deze oefening maakt deel uit van de cursus

Analyzing Financial Statements in Python

Cursus bekijken

Oefeninstructies

  • Begin by reading cash_flow_tech.json as a pandas DataFrame.
  • Merge the income statement with the balance sheet data, calling the result merged_income_statement_balance_sheet; use "Year" and "company" as columns to join on.
  • Merge cash flow data with merged_income_statement_balance_sheet.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Read cash flow data
cash_flow = ____

# Merge income statement data with balance sheet data
____ = pd.____(income_statement, ____, on=____)

# Now merge it with cash flow data
merged_all = pd.____(cash_flow, ____, on=____)
Code bewerken en uitvoeren