What to do with missing values when plotting with seaborn?
问题 I replaced the missing values with NaN using lambda following function: data = data.applymap(lambda x: np.nan if isinstance(x, basestring) and x.isspace() else x) ,where data is the dataframe I am working on. Using seaborn afterwards,I tried to plot one of its attributes,alcconsumption using seaborn.distplot as follows: seaborn.distplot(data['alcconsumption'],hist=True,bins=100) plt.xlabel('AlcoholConsumption') plt.ylabel('Frequency(normalized 0->1)') It's giving me the following error: