If you want to get the kde values ββof the histogram, you can use the scikit-learn KernelDensity function instead:
import numpy as np import pandas as pd from sklearn.neighbors import KernelDensity ds=pd.read_csv('data-to-plot.csv') X=ds.loc[:,'Money-Spent'].values[:, np.newaxis] kde = KernelDensity(kernel='gaussian', bandwidth=0.75).fit(X)
source share