import pandas as pd
import matplotlib.pyplot as plt
"""
1.1 Reading data from a csv file
"""
broken_df = pd.read_csv('../data/bikes.csv')
fixed_df = pd.read_csv('../data/bikes.csv', sep=';', encoding='latin1', parse_dates=['Date'], dayfirst=True,
index_col='Date')
print fixed_df[:3]
print type(fixed_df)
print
"""
1.2 Selecting a column
"""
print fixed_df['Berri 1']
"""
1.3 Plotting a column
"""
fixed_df['Berri 1'].plot()
plt.show()
fixed_df.plot(figsize=(15, 10))
plt.show()
"""
1.4 Putting all that together
"""
df = pd.read_csv('../data/bikes.csv', sep=';', encoding='latin1', parse_dates=['Date'], dayfirst=True, index_col='Date')
df['Berri 1'].plot()
plt.show()