title: How to make multiple plots with seaborn from a wide dataframe
body: <p>I'm currently learning about data visualization using seaborn, and I came across a problem that I couldn't find a solution to.</p>
  <pre class="lang-py prettyprint-override"><code>import pandas as pd
  import matplotlib.pyplot as plt
  import seaborn as sns
  %matplotlib inline
  </code></pre>
  <p>So I have this data</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">index</th>
  <th style="text-align: center;">col1</th>
  <th style="text-align: center;">col2</th>
  <th style="text-align: center;">col3</th>
  <th style="text-align: center;">col4</th>
  <th style="text-align: center;">col5</th>
  <th style="text-align: center;">col6</th>
  <th style="text-align: center;">col7</th>
  <th style="text-align: right;">col8</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">1990</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">4</td>
  <td style="text-align: center;">7</td>
  <td style="text-align: center;">3</td>
  <td style="text-align: center;">7</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">6</td>
  <td style="text-align: right;">6</td>
  </tr>
  <tr>
  <td style="text-align: left;">1991</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">7</td>
  <td style="text-align: center;">5</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">8</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">8</td>
  <td style="text-align: right;">4</td>
  </tr>
  <tr>
  <td style="text-align: left;">1992</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">5</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">9</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">7</td>
  <td style="text-align: right;">2</td>
  </tr>
  <tr>
  <td style="text-align: left;">1993</td>
  <td style="text-align: center;">2</td>
  <td style="text-align: center;">7</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">6</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">2</td>
  <td style="text-align: right;">7</td>
  </tr>
  <tr>
  <td style="text-align: left;">1994</td>
  <td style="text-align: center;">4</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">5</td>
  <td style="text-align: center;">5</td>
  <td style="text-align: center;">8</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">6</td>
  <td style="text-align: right;">3</td>
  </tr>
  <tr>
  <td style="text-align: left;">1995</td>
  <td style="text-align: center;">7</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">6</td>
  <td style="text-align: center;">4</td>
  <td style="text-align: center;">8</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">5</td>
  <td style="text-align: right;">7</td>
  </tr>
  <tr>
  <td style="text-align: left;">1996</td>
  <td style="text-align: center;">5</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">4</td>
  <td style="text-align: center;">6</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">7</td>
  <td style="text-align: right;">4</td>
  </tr>
  <tr>
  <td style="text-align: left;">1997</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">4</td>
  <td style="text-align: center;">7</td>
  <td style="text-align: center;">5</td>
  <td style="text-align: center;">5</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">8</td>
  <td style="text-align: right;">5</td>
  </tr>
  <tr>
  <td style="text-align: left;">1998</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">3</td>
  <td style="text-align: center;">7</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">7</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">7</td>
  <td style="text-align: right;">1</td>
  </tr>
  <tr>
  <td style="text-align: left;">1999</td>
  <td style="text-align: center;">5</td>
  <td style="text-align: center;">7</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">6</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">8</td>
  <td style="text-align: right;">5</td>
  </tr>
  <tr>
  <td style="text-align: left;">2000</td>
  <td style="text-align: center;">3</td>
  <td style="text-align: center;">8</td>
  <td style="text-align: center;">5</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">3</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">6</td>
  <td style="text-align: right;">3</td>
  </tr>
  <tr>
  <td style="text-align: left;">2001</td>
  <td style="text-align: center;">6</td>
  <td style="text-align: center;">0</td>
  <td style="text-align: center;">4</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">7</td>
  <td style="text-align: center;">1</td>
  <td style="text-align: center;">2</td>
  <td style="text-align: right;">7</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to make barplots/histplots with col1, col2 .. col8 as one column and 1990 values as one column so like
  1990;</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>col?</th>
  <th>val</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>col1</td>
  <td>0</td>
  </tr>
  <tr>
  <td>col2</td>
  <td>4</td>
  </tr>
  <tr>
  <td>col3</td>
  <td>7</td>
  </tr>
  <tr>
  <td>col4</td>
  <td>3</td>
  </tr>
  <tr>
  <td>col5</td>
  <td>7</td>
  </tr>
  <tr>
  <td>col6</td>
  <td>0</td>
  </tr>
  <tr>
  <td>col7</td>
  <td>6</td>
  </tr>
  <tr>
  <td>col8</td>
  <td>6</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>and plot them for each year from 1990 to 2001.</p>
  <pre class="lang-py prettyprint-override"><code>g = sns.FacetGrid(df, col=df.index.value_counts())
  g.map(sns.histplot, df.columns)
  </code></pre>
  <p>This is the code  that I've written
  I looked at facetgrid but could get it working for my case, any feedback is appreciated.</p>