#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar  8 14:28:21 2018

@author: teacher
"""

import pandas as pd
import matplotlib.pyplot as plt

rodents = pd.read_csv('311_Service_Requests_Rodents.csv')

# change Created Date to have datetime format
rodents['Created Date'] = pd.to_datetime(rodents['Created Date'])

# count how many complaints there were each day
counts = rodents['Created Date'].dt.date.value_counts()

# Plots the number of rodent complaints each day as a histogram
counts.plot.hist()
plt.show()

# Plots the number of rodent complaints each day as a line graph
counts.plot()
