Last active
October 2, 2026 05:20
-
Star
(140)
You must be signed in to star a gist -
Fork
(26)
You must be signed in to fork a gist
-
-
Save mwaskom/de44147ed2974457ad6372750bbe5751 to your computer and use it in GitHub Desktop.
A guide to replacing the deprecated `seaborn.distplot` function.
wasiqnafay
commented
Nov 29, 2025
- #@

you are dogs
Perhaps I'm posting this for myself, but here's a wrapper for the final example above showing how to replicate distplot()
def my_distplot(data=None, **kwargs):
kwargs.setdefault("kde", True)
kwargs.setdefault("stat", "density")
kwargs.setdefault("kde_kws", dict(cut=3))
kwargs.setdefault("alpha", .4)
kwargs.setdefault("edgecolor", None)
return sns.histplot(data, **kwargs)edgecolor is set slightly differently from the example because distplot by default doesn't have edges (the example gives it white opaque edges)
just run your import pandas as pd block again because this is your either library not written problem or secondly you do another task so thats why the notebook take too much time so just run once again that code of block and the problem get resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment