Skip to content Skip to sidebar Skip to footer

Seaborn Heatmap Pandas Calculation On Isnull

producing a series calculation of a dataframe to provide a percentage of NaN's to the total amount of rows as shown: data = df.isnull().sum()/len(df)*100 RecordID 0.00000

Solution 1:

Your data variable is an instance of pd.Series which is inherently 1D. However, sns.heatmap expects a 2D input. A quick fix is for example the following:

sns.heatmap(data.to_frame())

Post a Comment for "Seaborn Heatmap Pandas Calculation On Isnull"