scatter() function to create scatterplots. Printing out the head of the dataframe returns the following: ID Year Age Team Minutes Composite_Rating WinsĠ montgre01w 2019 32 Atlanta 949 -2.4 1.22ġ williel01w 2019 26 Atlanta 909 0.6 2.51Ģ sykesbr01w 2019 25 Atlanta 880 -3.4 0.70ģ hayesti01w 2019 29 Atlanta 817 -1.5 1.45Ĥ brelaje01w 2019 31 Atlanta 767 -0.8 1.62 How to create Matplotlib scatter charts? Usecols = ĭf = df.str.replace('ATL', 'Atlanta')ĭf = df.str.replace('CHI', 'Chicago') The dataset contains quite a bit of data and the headers aren’t the clearest, so we’ll do a little bit of cleaning up.
Let’s also import a dataset from Five Thirty Eight in regards to WNBA scores, which you can find here. How to add a style to Matplotlib charts?įor this tutorial, we’re going to use Pandas and Matplotlib.How to change marker size in Matplotlib scatter charts?.How to add a legend to Matplotlib scatter charts?.How to customize scatter marker colours?.How to add titles and axis labels to Matplotlib scatter charts?.How to create Matplotlib scatter charts?.