"""
Name: Paul Briant
Date: 12/11/16
Class: Introduction to Python
Assignment: Final Project

Description:
Code for Final Project
"""

import pandas
from datetime import datetime

# Change source to smaller file.
data = pandas.read_csv("data/Residential_Water_Usage_Zip_Code_on_Top.csv")

# print(data["Date Text"].head())


first_date = data["Date Text"].values[0]
print(first_date)

# datetime.strptime(first_date, "%Y-%m-%d")
# datetime(2012, 3, 10, 0, 0)

# data.date = data.date.apply(lambda d: datetime.strptime(d, "%Y-%m-%d"))
# print(data.date.head())
# data.index = data.date
# print(data)

# print(data.ix[datetime(2012, 8, 19)])

# Remove date column
# data = data.drop(["date"], axis=1)
# print(data.columns)

# Determine what values are missing
# empty = data.apply(lambda col: pandas.isnull(col))

@@ -279,16 +279,195 @@
 Top.csv%22
+,%0A                       parse_dates=%5B0%5D, infer_datetime_format=True)%0Atemp = pandas.DatetimeIndex(data%5B%22Date_Text%22%5D)%0Adata%5B%22Month%22%5D = temp.month%0Adata%5B%22Year%22%5D = temp.year%0Aprint(data
 )%0A%0A# pri
@@ -497,16 +497,18 @@
 ad())%0A%0A%0A
+# 
 first_da
@@ -540,16 +540,18 @@
 lues%5B0%5D%0A
+# 
 print(fi
@@ -599,18 +599,16 @@
 , %22%25
-Y-%25m-%25d
+b-%25Y
 %22)%0A
+%0A
 # da
@@ -652,21 +652,29 @@
 e = data
-.date
+%5B%22Date Text%22%5D
 .apply(l
@@ -709,15 +709,12 @@
 , %22%25
-Y-%25m-%25d
+b-%25Y
 %22))%0A

Add code to split month and year into new columns.