Solutions

Check your data

In [13]:
planet_df[planet_df.isna().any(axis=1)]
Out[13]:
name orbital_period semi_major_axis detection_type star_mass
In [14]:
planet_df[planet_df.isna().any(axis=1)].shape
Out[14]:
(0, 5)
In [15]:
planet_df[~planet_df.isna().any(axis=1)]
Out[15]:
name orbital_period semi_major_axis detection_type star_mass
0 11 Com b 326.03000 1.2900 Radial Velocity 2.70
1 11 UMi b 516.22000 1.5400 Radial Velocity 1.80
2 14 And b 185.84000 0.8300 Radial Velocity 2.20
3 14 Her b 1773.40000 2.7700 Radial Velocity 0.90
4 16 Cyg B b 799.50000 1.6800 Radial Velocity 1.01
... ... ... ... ... ...
3827 tau Gem b 305.50000 1.1700 Radial Velocity 2.30
3828 ups And b 4.61711 0.0590 Radial Velocity 1.27
3829 ups And c 240.93700 0.8610 Radial Velocity 1.27
3830 ups And d 1281.43900 2.5500 Radial Velocity 1.27
3831 ups And e 3848.86000 5.2456 Radial Velocity 1.27

2049 rows × 5 columns

In [16]:
planet_df[~planet_df.isna().any(axis=1)].shape
Out[16]:
(2049, 5)