0

I have a large pandas dataframe (15 columns, 770 rows) called no_autocorr and I want to plot all of the variables on a seaborn pair plot. Here is the .dtypes of my variables:

no_autocorr.dtypes

Year                    object
Month                   object
State                   object
Primary Mode            object
Illnesses                int64
Outbreak ID             object
Strain                  object
Density (Pop./ mi2)      int64
Landarea(mi2)            int64
HDI (2017)[note 1]     float64
Average High (F)         int64
Length of Genome       float64
%GC                    float64
tRNA Genes               int64
%Protein Coding        float64
dtype: object

When I run

import matplotlib.pyplot as plt
import seaborn as sns
sns.pairplot(no_autocorr, height=2.5, aspect=1)

I get the error:

ValueError: color kwarg must have one color per data set. 770 data sets and 1 colors were provided

An empty pair plot appears. I'm confused as to why I'm getting this error since I do not specify any color arguments. Is something wrong with my dataframe? Do I need to keep tweaking the height/aspect in order for the data to show?

anky
  • 74,114
  • 11
  • 41
  • 70

0 Answers0