New-Mexico-Water-Resources / Water-Rights-Visualizer

New Mexico Water Rights Visualizer
1 stars 1 forks source link

Verify calculate_percent_nan mean update still produces same results #36

Closed fhy-jpl closed 1 month ago

fhy-jpl commented 1 month ago

Was getting a futureWarning message: /app/water_rights_visualizer/calculate_percent_nan.py:157: FutureWarning: The provided callable <function mean at 0x7fee5d08e8c0> is currently using SeriesGroupBy.mean. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string \"mean\" instead.\n monthavg = group.aggregate({'percent_nan': np.mean})\n

Had to update the mean aggregate call here: https://github.com/New-Mexico-Water-Resources/Water-Rights-Visualizer/blob/3fda7e04bce8bc074b31c5fa8de7591c58d83ecd/water_rights_visualizer/calculate_percent_nan.py#L157

from monthavg = group.aggregate({'percent_nan': np.mean})

to monthavg = group.aggregate({'percent_nan': "mean"})

per the suggestion in the warning. The code compiles and runs, but not to verify that the final product was not impacted by this change

fhy-jpl commented 1 month ago

rolled this change back since there are still other warnings that pop up and mess up the daemon logging anyway