---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-129-2f6abe6f2573> in <module>()
----> 1 dc_df['neighborhood'] = dc_df.apply(assign_geo_designation_tract, axis='columns')
/usr/local/var/pyenv/versions/3.5.2/envs/parking_data/lib/python3.5/site-packages/pandas/core/frame.py in apply(self, func, axis, broadcast, raw, reduce, args, **kwds)
4161 if reduce is None:
4162 reduce = True
-> 4163 return self._apply_standard(f, axis, reduce=reduce)
4164 else:
4165 return self._apply_broadcast(f, axis)
/usr/local/var/pyenv/versions/3.5.2/envs/parking_data/lib/python3.5/site-packages/pandas/core/frame.py in _apply_standard(self, func, axis, ignore_failures, reduce)
4257 try:
4258 for i, v in enumerate(series_gen):
-> 4259 results[i] = func(v)
4260 keys.append(v.name)
4261 except Exception as e:
<ipython-input-111-460e910427e1> in assign_geo_designation_tract(row)
1 def assign_geo_designation_tract(row):
2 """ Takes in a geopandas frame and creates a new column categorizing which geoshape a row contains"""
----> 3 bools = [geom.contains(row['geometry']) for geom in neighborhood_clusters['geometry']]
4 if True in bools:
5 return neighborhood_clusters.iloc[bools.index(True)]['NBH_NAMES']
<ipython-input-111-460e910427e1> in <listcomp>(.0)
1 def assign_geo_designation_tract(row):
2 """ Takes in a geopandas frame and creates a new column categorizing which geoshape a row contains"""
----> 3 bools = [geom.contains(row['geometry']) for geom in neighborhood_clusters['geometry']]
4 if True in bools:
5 return neighborhood_clusters.iloc[bools.index(True)]['NBH_NAMES']
/usr/local/var/pyenv/versions/3.5.2/envs/parking_data/lib/python3.5/site-packages/pandas/core/series.py in __getitem__(self, key)
602
603 if not is_scalar(result):
--> 604 if is_list_like(result) and not isinstance(result, Series):
605
606 # we need to box if we have a non-unique index here
/usr/local/var/pyenv/versions/3.5.2/envs/parking_data/lib/python3.5/site-packages/pandas/types/inference.py in is_list_like(arg)
52
53 def is_list_like(arg):
---> 54 return (hasattr(arg, '__iter__') and
55 not isinstance(arg, string_and_binary_types))
56
KeyboardInterrupt: