ComeçarComece de graça

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.

Este exercício faz parte do curso

Analyzing Financial Statements in Python

Ver curso

Instruções do exercício

  • 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.

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# 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=____)
Editar e executar o código