Convert data frame to numpy array
df.as_matrix()
Apply a function to a data frame
This one will multiple all values in the “height” column of the data frame by 2
df["height"].apply(lambda height: 2 * height) df.as_matrix()
This one will multiple all values in the “height” column of the data frame by 2
df["height"].apply(lambda height: 2 * height)