title: Python create a line plot on each type of column value in dataframe
body: <p>I have the following dataframe:</p>
  <pre><code>gapminder
  </code></pre>
  <p><a href="https://i.stack.imgur.com/XapTA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XapTA.png" alt="enter image description here" /></a></p>
  <p>It has five unique values for continent.</p>
  <p><a href="https://i.stack.imgur.com/niiqX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/niiqX.png" alt="enter image description here" /></a></p>
  <p>I need to create a plot that looks something like:</p>
  <p><a href="https://i.stack.imgur.com/YGq4i.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YGq4i.png" alt="enter image description here" /></a></p>
  <p>I have used <code>df.groupby().apply()</code> to apply plot function on each country of the data:</p>
  <pre><code>fig,ax=plt.subplots(1)
  
  def plot_lines(df,x_axis,y_axis,**kwargs):
      ax.plot(df[x_axis],df[y_axis],**kwargs)
  
  gapminder.groupby(&quot;country&quot;).apply(plot_lines,&quot;year&quot;,&quot;lifeExp&quot;)
  </code></pre>
  <p>This creates this plot:</p>
  <p><a href="https://i.stack.imgur.com/mHDcL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mHDcL.png" alt="enter image description here" /></a></p>
  <p>Now the problem is, how do I create a line plot on each type of continent of the data, I want to create a line plot (year vs lifeExp) on each continent.</p>