Home > Software design >  How to make a scatterplot
How to make a scatterplot

Time:11-30

I would like to make a point cloud with these two columns but I can't do it, can you help me?

Code

import pandas as pd
import matplotlib.pyplot as plt 
members = pd.read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-09-22/members.csv")

x = members["member_id"]
y = members["death_height_metres"]

plt.scatter(x, y)

CodePudding user response:

You are missing plt.show() at the end. It will show you graph then.

CodePudding user response:

All your column values for height_metres are NaN

members["death_height_metres"].isna().sum()

Gives:75451

You need to check your data.

  • Related