Session Ready
Exercise

Creating new columns

Personal consumption expenditures (PCE) are a measurement of consumer consumption useful in judging the state and direction of the economy. Pretend that you are a financial analyst at an investment fund tasked with calculating PCE. PCE is the sum of consumption by consumers of durable goods (PCDG), non-durable goods (PCND), and services (PCESV). Let's calculate PCE using the list pcesv, the DataFrame pcnd, and PCDG from a CSV file.

Instructions
100 XP
  • Create a column named PCESV from a list of values pcesv.
  • Create a column named PCND from the DataFrame pcnd.
  • Use the function .read_csv() to create a column named PCD' from the CSV file pcdg.csv.
  • Create a new column named PCE by adding other columns together.