Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: merge() method to return GeoDataFrame also if only right frame is a GeoDataFrame #2185

Open
jorisvandenbossche opened this issue Oct 16, 2021 · 0 comments

Comments

@jorisvandenbossche
Copy link
Member

Pandas currently only checks the "left" frame to determine the class of the resulting DataFrame. This means that the order of the arguments passed matters: pd.merge(df, gdf, ..) (or df.merge(gdf, ..)) returns a DataFrame while pd.merge(gdf, df, ...) (or gdf.merge(df, ..)) returns a GeoDataFrame. This can be surprising for users.

I opened an issue for this on the pandas side: pandas-dev/pandas#44054 (as it needs to be solved there), but opening an issue here as well for visibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant