Repository navigation
Conversation
Member
|
Hey, thanks for the fix but I think this should be fixed in GeoPandas. I'll move it there. |
Member
|
The fix is in geopandas/geopandas#3933. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #41.
A station-by-time dataset can still fail to export with
to_geodataframe(long=False). After pandas unstacks a datetime or timedelta axis, the geometry column can have a label like("station", NaT). Selecting"station"then yields a one-column DataFrame, which GeoPandas rejects as ambiguous.Use the complete label when the geometry name identifies one column but selects a DataFrame. Revalidating the MultiIndex codes also makes the missing part of that label selectable in pandas 2. The tests check the active geometry, CRS, time labels and values.
I reproduced the failure with GeoPandas 0.14.4, 1.1.2 and 1.2.1. In the I/O tutorial’s county dataset, changing the four survey years to timestamps now yields a wide GeoDataFrame with all 49,360 measurements matched to their original county polygons.
The local suite passed 170 tests. Seven plotting snapshots failed on both branches with byte-identical rendered images. The five GeoDataFrame conversion tests passed in all seven CI environments. Each failing test had also failed in the corresponding upstream job. PR test run · Upstream test run
OpenAI Codex prepared the patch, tests and description.