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

Ch 12: merge #319

Open
dfolch opened this issue Jan 7, 2024 · 0 comments
Open

Ch 12: merge #319

dfolch opened this issue Jan 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@dfolch
Copy link

dfolch commented Jan 7, 2024

Chapter 12 typo? The default for merge is intersection, but I think the goal here is to keep all the observations. If this is the correct interpretation, then the resulting quantile map would likely need to be updated too since there are so many zeros.

Original

airbnbs_w_counts = airbnbs_albers.merge(poi_count, left_on="id", right_index=True).fillna({"poi_count": 0})

This results in 4601 observations.

Revision

airbnbs_w_counts = airbnbs_albers.merge(poi_count, left_on="id", how='left', right_index=True).fillna({"poi_count": 0})

This results in 6110 observations.

@darribas darribas added the bug Something isn't working label Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants