image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

uber_data = pd.read_csv('../input/uber-raw-data-janjune-15.csv')

uber_data.shape

Month = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
Index = [0, 1, 2, 3, 4, 5]
Monthly_pickup = uber_data.groupby(['Month']).size()
plt.xticks(Index, Month)

month = ['01', '02', '03', '04', '05', '06']
idx = [0, 7, 14, 21, 27]
def daily_pickup_plot(month):
    plot_data = uber_data[uber_data['Month'] == month]
    plot_data = plot_data.groupby(['Date']).size()
    plt.xticks(idx, plot_data.index[idx])
for i in range(0, 6):
    plt.ylim(0, 140000)

Hourly_pickup = uber_data.groupby(['Hour']).size()
mean = Hourly_pickup.mean()
hour = [i for i in range(0, 24)]
plt.figure(1, figsize=(12, 6))
plt.bar(hour, Hourly_pickup)
plt.title('UBER Hourly Pickup Summary of NYC, Jan 2015 - Jun 2015')
plt.xlabel('')
plt.xticks(hour, hour)
plt.show()