import pandas as pd
titanic_df = pd.read_csv('titanic.csv')
print(titanic_df.head())
print(titanic_df.groupby(['Sex', 'Survived'])['PassengerID'].count())
print(titanic_df.groupby(['Name','Sex', 'Survived'])['PassengerID'].count())

df = pd.read_csv('apple.csv', index_col='Date', parse_dates=True)
df = df.sort_index()
print(df.info())

import matplotlib.pyplot as plt
new_sample_df = df.loc['2012-Feb':'2017-Feb', ['Close']]
new_sample_df.plot()
plt.show()