daily_std_error¶
- hydrostats.data.daily_std_error(merged_data: DataFrame) DataFrame¶
Calculate daily seasonal standard error of the timeseries data in a DataFrame.
- Parameters:
merged_data (DataFrame) – A pandas DataFrame with a datetime index and columns containing float type values.
- Returns:
A pandas dataframe with a string type index of date representations and the daily seasonal standard error as float values in the columns.
- Return type:
DataFrame
Examples
>>> import hydrostats.data as hd >>> import pandas as pd >>> pd.options.display.max_rows = 15
The data URLs contain streamflow data from two different models, and are provided from the Hydrostats Github page
>>> sfpt_url = r"https://github.com/waderoberts123/Hydrostats/raw/master/Sample_data/sfpt_data/magdalena-calamar_interim_data.csv" >>> glofas_url = r"https://github.com/waderoberts123/Hydrostats/raw/master/Sample_data/GLOFAS_Data/magdalena-calamar_ECMWF_data.csv" >>> merged_df = hd.merge_data( ... sfpt_url, glofas_url, column_names=("Streamflow Prediction Tool", "GLOFAS") ... )
>>> hd.daily_std_error(merged_df) Streamflow Prediction Tool GLOFAS 01/01 558.189895 494.958042 01/02 553.290181 442.497656 01/03 535.002487 432.096928 01/04 514.511095 422.915060 01/05 489.287216 411.861086 01/06 463.321927 401.023620 01/07 441.666108 395.703128 ... ... 12/25 613.876851 566.669886 12/26 589.424434 567.179646 12/27 582.957832 557.932109 12/28 581.465297 540.021918 12/29 573.949000 517.494155 12/30 560.993945 495.040565 12/31 546.904139 474.742075 [366 rows x 2 columns]