I replaced the missing NaN values using the following lambda function:
data = data.applymap(lambda x: np.nan if isinstance(x, basestring) and x.isspace() else x)
where data is the data frame I'm working on.
Using the sea castle afterwards, I tried to build one of its attributes using alabonsumption using seaborn.distplot as follows:
seaborn.distplot(data['alcconsumption'],hist=True,bins=100)
plt.xlabel('AlcoholConsumption')
plt.ylabel('Frequency(normalized 0->1)')
This gives me the following error:
AttributeError: max must be larger than min in range parameter.
source
share