title: How to plot several line charts in one figure (overlay/groupby)
body: <p>I would like to illustrate the change in one variable for several persons in my data over time. I have several issues with basic commands here. </p>
  
  <p>Here is my data:</p>
  
  <pre class="lang-py prettyprint-override"><code>import pandas as pd
  df = pd.DataFrame({'year': ['1988', '1989', '1990', '1988', '1989', '1990', '1988', '1989', '1990'],
                     'id': ['1', '1', '1', '2', '2', '2', '3', '3', '3'],
                     'money': ['5', '7', '8', '8', '3', '3', '7', '8', '10']}).astype(int)
  
  df.info()
  df
  </code></pre>
  
  <p>I tried to make use of <code>matplotlib</code> and started to loop for each of my unique IDs. I'm new to this package. First, how can I specify for each plot that only 3 points are connected for a line, not all? Second, how can I overlay those plots in one figure? </p>
  
  <pre class="lang-py prettyprint-override"><code>import matplotlib.pyplot as plt
  
  for i in df.id.unique():
          df.plot.line(x='year', y='money')
  </code></pre>