Skip to content

Instantly share code, notes, and snippets.

@Akramz
Created December 15, 2015 15:33
Show Gist options
  • Save Akramz/57e6c035b19177c98f72 to your computer and use it in GitHub Desktop.
Save Akramz/57e6c035b19177c98f72 to your computer and use it in GitHub Desktop.
import pandas as pd
import numpy as np
data = pd.read_csv('../../data/train.csv', sep=',')
train = data[['PdDistrict']]
train['count'] = 1
train = train.groupby('PdDistrict').sum().reset_index()
print train
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment