Closed martinfleis closed 1 day ago
As per @anitagraser's report in #2378, this snippet caused JSON serialisation error even though we say we support datetime.
import pandas as pd import shapely import geopandas as gpd df = gpd.GeoDataFrame( index=[pd.Timestamp("2018-01-01 12:02:00"), pd.Timestamp("2018-01-02 12:02:00")], geometry=[shapely.Point(0, 0), shapely.Point(2, 0)], ) df.index.name = "t" df.explore()
Interestingly enough, non-named datetime index was fine. Only named caused issues.
Fixed by explicitly checking for index dtype and converting as we do with columns.
Given @jorisvandenbossche is away, I am not going to wait for a review and merge so we can cut 1.0.1 fixing #3362 regression.
As per @anitagraser's report in #2378, this snippet caused JSON serialisation error even though we say we support datetime.
Interestingly enough, non-named datetime index was fine. Only named caused issues.
Fixed by explicitly checking for index dtype and converting as we do with columns.