Skip to content

Bug in calculating variable percentile thresholds due to NA

There seems to be a bug that is preventing calculating variable percentile thresholds in certain situations. This code snippet errors due to an NA

NaTType does not support strftime on this step meta["start_date"] = data.index.min().strftime("%Y-%m-%d") within utils.calculate_metadata()

test_df,_ = nwis.get_dv(sites='06024540', parameterCd='00060', start="1900-01-01", end="2023-10-01")
df = hyswap.utils.filter_approved_data(test_df, '00060_Mean_cd')
percentile_values = hyswap.percentiles.calculate_variable_percentile_thresholds_by_day(
    df, '00060_Mean', year_type = 'water')
Edited by Scott Hamshaw