seaborn画pairplot的时候,出现错误seaborn pairplot set hue:slice indices must be integers or None or have an __index__ mexthod


seaborn画pairplot的时候,出现错误seaborn pairplot set hue:slice indices must be integers or None or have an index mexthod

默认diag_kind的取值是auto,改为hist即可,如下:

sns.pairplot(data, hue='species', size=3, diag_kind="hist")