79392556

Date: 2025-01-28 01:20:37
Score: 0.5
Natty:
Report link

Eureka!

2 issues to note here for newbies such as myself:

  1. always double check during aggregation and groupby methods that you still have a geopandas dataframe instead of a pandas dataframe
  2. geopandas cannot accept datetime objects.

Adding this to the top fixed it:

agg_gdf = gpd.GeoDataFrame(agg_gdf, geometry='geometry')
agg_gdf.crs = "EPSG:4326"
agg_gdf.date = agg_gdf.date.astype(str)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Matt