My code is:
sns.countplot(x='marital', hue='loan', data=df, estimator=lambda x: sum(x==0)*100.0/len(x))
It gives the following error:
AttributeError Traceback (most recent call last)
<ipython-input-21-9615e7e7b899> in <module>()
----> 1 sns.countplot(x='marital', hue='loan', data=df, estimator=lambda x: sum(x==0)*100.0/len(x))
8 frames
/usr/local/lib/python3.7/dist-packages/matplotlib/artist.py in _update_property(self, k, v)
1000 if not callable(func):
1001 raise AttributeError('{!r} object has no property {!r}'
-> 1002 .format(type(self).__name__, k))
1003 return func(v)
1004
AttributeError: 'Rectangle' object has no property 'estimator'