<p dir="auto">When visualizing high-dimensional datasets, parallel coordinates plots are sometimes very useful. I would love for Seaborn to have a build in function to do this!</p>
<p dir="auto"><strong>Resources</strong></p>
<ul dir="auto">
<li>Wikipedia: <a href="https://en.wikipedia.org/wiki/Parallel_coordinates" rel="nofollow">Parallel coordinates</a></li>
<li>Python Graph Gallery: <a href="https://www.python-graph-gallery.com/parallel-plot/" rel="nofollow">Parallel coordinate plot</a></li>
<li>plotly: <a href="https://plotly.com/python/parallel-coordinates-plot/" rel="nofollow">Parallel Coordinates Plot in Python</a></li>
<li>Pandas docs: <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.plotting.parallel_coordinates.html" rel="nofollow">pandas.plotting.parallel_coordinates</a></li>
</ul>
<p dir="auto">Tested with seaborn's latest dev version, pandas 1.2.3.</p>
<p dir="auto">Dataframes can have indices with repeated entries. For example, <code class="notranslate">df.explode</code> which converts lists in cells into separate rows, keeps the original indices.  Some seaborn functions generate an error <code class="notranslate">ValueError: cannot reindex from a duplicate axis</code> with such dataframes.  <code class="notranslate">lineplot</code>, <code class="notranslate">stripplot</code>, <code class="notranslate">swarmplot</code> give such error.  <code class="notranslate">pointplot</code>, <code class="notranslate">barplot</code> and <code class="notranslate">boxplot</code> work without problem.</p>
<p dir="auto">Calling <code class="notranslate">.reset_index()</code> makes the problem go away.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import` pandas as pd
import seaborn as sns

df = pd.DataFrame({'x': [1, 2],
                   'val': [[3, 4, 5], [6, 7]] })
sns.stripplot(data=df.explode('val'), x='x', y='val')"><pre class="notranslate"><code class="notranslate">import` pandas as pd
import seaborn as sns

df = pd.DataFrame({'x': [1, 2],
                   'val': [[3, 4, 5], [6, 7]] })
sns.stripplot(data=df.explode('val'), x='x', y='val')
</code></pre></div>
<p dir="auto">In seaborn 0.11.1 this same problem doesn't seem to exist.</p>
<p dir="auto">PS: <code class="notranslate">sns.violinplot(data=df.explode('val').reset_index(), x='x', y='val')</code> gives a complete different error, although something similar to <code class="notranslate">boxplot</code> would be expected (<code class="notranslate">TypeError: No loop matching the specified signature and casting was found for ufunc add</code>, during a call to <code class="notranslate">gaussian_kde</code>, numpy version <code class="notranslate">1.20.1</code>, scipy <code class="notranslate">1.5.2</code>).</p>