In [1]:
# converts joined_unfeaturized.csv to joined_unfeaturized_mini.csv

DATA_PATH = "joined_unfeaturized.csv" 
import pandas as pd
full_df = pd.read_csv(DATA_PATH, na_values=['-'])
full_df = full_df.where((pd.notnull(full_df)), None)
full_df.head(1)


Out[1]:
feature-311 tuple 911-reports
0 [{'Category': 'Sign Repair', 'TimeBin': 627414... (6274149.810962193, -122.42479733333332, 37.77... []

In [21]:
lst = []
for i in xrange(len(full_df)):
    lst.append((i%10)==0)
mini_df = full_df[pd.Series(lst)]
mini_df.head(3)


Out[21]:
feature-311 tuple 911-reports
0 [{'Category': 'Sign Repair', 'TimeBin': 627414... (6274149.810962193, -122.42479733333332, 37.77... []
10 [{'Category': 'Sidewalk or Curb', 'TimeBin': 1... (16110397.579115825, -122.43828377777778, 37.7... []
20 [{'Category': 'General Requests', 'TimeBin': 1... (170454482.92878577, -122.45177022222221, 37.7... []

In [22]:
#store joined dataframe into csv.
mini_df.to_csv('joined_unfeaturized_mini.csv', index_label=False)