title: Plot specific values in a pandas df
body: <p>I'm not sure if there's a more efficient way to perform this. I've got a <code>df</code> with one <code>Column</code> containing information of interest. For the df below I'm interested in <code>Column B</code>. I want to create separate <code>plots</code> for each of <code>W,X,Y,Z</code> values. I'm also hoping to start each separate plot when these values change.  </p>
  
  <pre><code>import pandas as pd
  import matplotlib.pyplot as plt
  
  d = ({
      'A' : [1,2,3,4,5,6,7,8,1,3],            
      'B' : ['W','W','X','X','Y','Y','Z','Z','W','W'], 
       })
  
  df = pd.DataFrame(data=d)
  </code></pre>
  
  <p>So this df would display 4 different plots. There would 2 lines for the <code>W</code> value.</p>
  
  <p>I'm currently exporting the above df into there own separate <code>series</code>. If I plot the values relating to <code>W</code> The output would be:</p>
  
  <pre><code>   W1  W2  X1  Y1  Z1
  0   1   1   3   5   8
  1   2   3   4   6   9
  
  fig, ax = plt.subplots()
  
  plt.plot(df['W1'])
  plt.plot(df['W2'])
  </code></pre>
  
  <p>But this would mean I'm creating numerous separate <code>series</code> and <code>plots</code>. This wouldn't be very inefficient if my <code>df</code> contained 1000's of <code>rows</code> that continuously changed between values.</p>
  
  <p><a href="https://i.stack.imgur.com/NL8bN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NL8bN.png" alt="enter image description here"></a>
  Is there an easier way? I think I'll still have to export each value to it's own series when the values change. </p>
  
  <p>But I'm hoping there's an easier way to plot each series over the top of each each other without doing this.</p>