In [1]:
# Import modules that contain functions we need
import pandas as pd
import numpy as np
%matplotlib inline
import matplotlib.pyplot as plt

In [2]:
data = pd.read_csv("./exoplanets-2.csv")

In [3]:
# list first 3 rows in table
data.head(3)


Out[3]:
DEPTH R RSTAR MASS ECC DATE DENSITY DIST GRAVITY STARDISCMETH RA DEC
0 0.010000 0.000000 1.613 0.000000 0.0 NaN NaN NaN NaN NaN NaN NaN
1 66.100000 0.008101 0.109 0.000001 0.0 NaN NaN NaN NaN NaN NaN NaN
2 0.000012 0.027008 0.770 0.009587 0.0 2013.0 645.278 66.0 4.55299 Transit 18.937307 44.518139

In [14]:
# make a histogram of a column
plt.hist(data.MASS, bins=20, range=[0,100]);
plt.title("title")
plt.xlabel("label")
plt.ylabel("label")


Out[14]:
<matplotlib.text.Text at 0x113da1c18>

In [16]:
# scatterplot
plt.scatter(data.R,data.RSTAR)
plt.title('title')
plt.xlabel('label')
plt.ylabel('label')
plt.show()


For more ideas, see the notebooks at the GitHub.

  • the "CMS mass plot" notebook has examples of selecting a subset of the data based on ranges of values.

In [ ]: