diff --git a/data/data-pipeline/data_pipeline/etl/score/etl_score_post.py b/data/data-pipeline/data_pipeline/etl/score/etl_score_post.py index fdb28cbe5..87fbecda2 100644 --- a/data/data-pipeline/data_pipeline/etl/score/etl_score_post.py +++ b/data/data-pipeline/data_pipeline/etl/score/etl_score_post.py @@ -236,13 +236,10 @@ def _create_tile_data( for col, col_dtype in score_tiles.dtypes.items() if col_dtype == np.dtype("float64") ] - score_tiles[float_cols] = score_tiles[float_cols].apply( - func=lambda series: floor_series( - series=series, - number_of_decimals=constants.TILES_ROUND_NUM_DECIMALS, - ), - axis=0, - ) + scale_factor = 10**constants.TILES_ROUND_NUM_DECIMALS + score_tiles[float_cols] = ( + score_tiles[float_cols] * scale_factor + ).apply(np.floor) / scale_factor logger.info("Adding fields for island areas and Puerto Rico") # The below operation constructs variables for the front end.