title: Getting multiple legends from for loop with specific data column and row as legend title
body: <p>I have a plot that iterates through different databases in a list. However, I of course want to know which database is what graph. The databases don't have a title. So I was thinking of using a specific point from a column / row. Which makes it clear for me what database I am seeing.</p>
  <p>Inorder to extract a specific float from a column / row which is contained in my list of databases,</p>
  <p>I use: <code>specific_float = list_of_databases[list_index][database_column_name][database_index]</code></p>
  <p>The same principle I would like to use for my for loop with plots. So I was thinking of something like this:</p>
  <p>Some context about the names in the code:</p>
  <ul>
  <li>dc_oppervlakte_filter is the list with dataframes</li>
  <li>TP_TARGET is an column name from the dataframes</li>
  <li>TP_SMOTE same story as TP_TARGET</li>
  <li>STRIP_WIDTH is the column I want to use for my legend with index 0</li>
  </ul>
  <pre><code>for k in dc_oppervlakte_filter:
      plt.plot(k['TP_TARGET'], k['TP_SMOTE'], 'o', label = k['STRIP_WIDTH'][0])
  plt.xlabel(&quot;TP_TARGET in ($\u00b0C$)&quot;)
  plt.ylabel(&quot;TP_SMOTE in ($\u00b0C$)&quot;)
  plt.legend(loc = 'lower right')
  </code></pre>
  <p>However, this gives me the error: Keyerror: 0</p>
  <p>So I tried:</p>
  <pre><code>for k in dc_oppervlakte_filter:
      plt.plot(k['TP_TARGET'], k['TP_SMOTE'], 'o', label = dc_oppervlakte_filter[k]['STRIP_WIDTH'][0])
  plt.xlabel(&quot;TP_TARGET in ($\u00b0C$)&quot;)
  plt.ylabel(&quot;TP_SMOTE in ($\u00b0C$)&quot;)
  plt.legend(loc = 'lower right')
  </code></pre>
  <p>But it gives me the error: TypeError: list indices must be integers or slices, not DataFrame</p>
  <p>An optimal scenario for me would look like that there's an legend with the specific float chosen from every database that's used to plot a graph.</p>