Skip to content

Commit

Permalink
Fix null total_rows for NYC (causing NYC to show 0 units in compariso…
Browse files Browse the repository at this point in the history
…n view)
  • Loading branch information
sid-kap committed Sep 24, 2023
1 parent a85963a commit 5646cb4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/housing_data/build_places.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,10 @@ def _make_nyc_rows(raw_places_df: pd.DataFrame) -> pd.DataFrame:
)
& (raw_places_df["state_code"] == 36)
]
# TODO might need to add "month" to the groupby?
nyc_rows = (
nyc_df.groupby("year")[get_numerical_columns(DataSource.BPS)]
nyc_df.groupby("year")[
get_numerical_columns(DataSource.BPS, totals=True, projected=True)
]
.sum()
.reset_index()
)
Expand Down

0 comments on commit 5646cb4

Please sign in to comment.