monthly_std_error¶
-
hydrostats.data.
monthly_std_error
(merged_data)¶ Calculates monthly 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 monthly 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.monthly_std_error(merged_df) Streamflow Prediction Tool GLOFAS 01 75.348943 71.206858 02 65.182159 58.347438 03 83.865980 72.919782 04 131.199766 123.486202 05 165.707528 139.586564 06 149.938998 136.119774 07 136.449337 115.436215 08 129.371343 110.101251 09 143.367894 123.798265 10 133.911782 114.008446 11 146.896826 116.443188 12 135.092750 117.958715