Preprocessing (hydrostats.data)

hydrostats.data Module

Tools for preprocessing data.

The data module contains tools for preprocessing data. It allows users to merge timeseries, compute daily and monthly summary statistics, and get seasonal periods of a time series.

Functions

daily_average(df[, rolling])

Calculate daily seasonal averages of the timeseries data in a DataFrame.

daily_std_dev(merged_data)

Calculate daily seasonal standard deviation of the timeseries data in a DataFrame.

daily_std_error(merged_data)

Calculate daily seasonal standard error of the timeseries data in a DataFrame.

julian_to_gregorian(dataframe[, frequency, ...])

Convert the index of the dataframe from julian float values to gregorian datetime values.

merge_data([sim_fpath, obs_fpath, sim_df, ...])

Merge two dataframes or csv files, depending on the input.

monthly_average(merged_data)

Calculate monthly seasonal averages of the timeseries data in a DataFrame.

monthly_std_dev(merged_data)

Calculate monthly seasonal standard deviation of the timeseries data in a DataFrame.

monthly_std_error(merged_data)

Calculate monthly seasonal standard error of the timeseries data in a DataFrame.

remove_nan_df(merged_dataframe)

Drop rows with NaN, zero, negative, and inf values from a pandas dataframe.

seasonal_period(...)

Create a dataframe with a specified seasonal period.