AttributeError on Seaborn - displot

Hi there,

I’m stuck with the AttributionError that says module ‘seaborn’ has no attribute ‘displot’ for the OKCupid Data-A-Scientist. Here is my code for this part. So I checked the example solution and ran the entire code, but the solution also got the same error. I use Jupyter Notebook to work on this project.

Thank you, everyone, for your help in advance!

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

plt.rcParams['figure.figsize'] = [6, 6]
%matplotlib inline

import warnings

sns.displot(data=profiles, x="age", kind="hist", binwidth = 5)

This might be due to the version of Seaborn that you have. Do you know what version you have installed?

displot() is for version 0.11.0. So, you might have to update Seaborn.

Welcome to the forums!

1 Like

You can check this way (after you’ve imported seaborn):