kjordahl/geopandas — pull request #26 by kjordahl (2013-09-06 03:10:16+00:00)
Title: Improved typing of GeoSeries

These changes implement a GeoSeries-specific `_constructor` property that propagates the correct type to many pandas methods. A check had to be added to the `__init__` method to ensure that objects with no geometries in them (e.g. booleans from tests) are actually returned as Series instead of GeoSeries.

This will close #19, at least for the set of methods mentioned there. Some of the ugly boilerplate wrapping is probably unnecessary now as well. Some more testing is needed to see that `groupby` and other methods actually return reasonable results, but they seem to return the correct types now.