Session Ready
Exercise

Forecasting profit for Tesla

As in the previous exercise, the dataset for the Tesla income statement is named income_statement. Using what we have learned in the previous exercise, we will now append a new column with 2018 Forecast data, which we will assign the header "Forecast".

For this exercise, we would like to set the filtered_income_statement to only show the row 'Revenue'.

Remember, the TTM column is the most recent 12-month value that we will use for the 2018 forecast. Thus far, we have the following information for 2018:

  • The market demand analysis predicts the revenue to increase to 13,000 in 2018 due to increased sales of Model 3.
Instructions
100 XP
  • Create a filtered income statement only for the revenue_metric row.
  • Get the number of columns of filtered_income_statement, using the length (len()) of the columns attribute.
  • Insert a new column in filtered_income_statement.
    • Locate it at the end of the row (use n_cols as the location).
    • Use 'Forecast' as the column name.
    • Insert the value 13000.
  • Print the result.