Introduction to Data Science in Python
Hillary Green-Lerman
Lead Data Scientist, Looker
import pandas as pd
from matplotlib import pyplot as plt
df = pd.read_csv('letter_frequency.csv')
plt.plot(df.letter_index, df.frequency, label='Ransom')
plt.show()
Functions perform actions:
pd.read_csv()
turns a csv file into a table in Pythonplt.plot()
turns data into a line plotplt.show()
displays plot in a new window
Function Name:
plt
)plot
)()
Positional Arguments:
Keyword Arguments:
label
), then an equals sign (=
)Ransom
)Introduction to Data Science in Python