1. Learn
  2. /
  3. Courses
  4. /
  5. Exploratory Data Analysis in Python

Exercise

Visualizing relationships over time

Now that your date data is saved as DateTime data, you can explore patterns over time! Does the year that a couple got married have a relationship with the number of children that the couple has at the time of divorce? Your task is to find out!

The divorce DataFrame (with all dates formatted as DateTime data types) has been loaded for you. pandas has been loaded as pd, matplotlib.pyplot has been loaded as plt, and Seaborn has been loaded as sns.

Instructions 1/2

undefined XP
    1
    2
  • Define a column called marriage_year, which contains just the year portion of the marriage_date column.