Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

04.14 Seaborn - Error "If using all scalar values, you must pass an index" in kdeplot #336

Open
ivlmag opened this issue Apr 26, 2022 · 0 comments

Comments

@ivlmag
Copy link

ivlmag commented Apr 26, 2022

This line at 04.14-Visualization-With-Seaborn :

If we pass the full two-dimensional dataset to kdeplot, we will get a two-dimensional visualization of the data:
sns.kdeplot(data)

Gives an error:

If using all scalar values, you must pass an index

To fix the error, more parameters should be added:

sns.kdeplot(data=data, x='x', y='y')

or

sns.kdeplot(data.x, data.y)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant