Utilities for time series and dates.
Fits AR(1) model.
Parameters: | arr – array-like, shape(M,) |
---|
:returns A dictionary with slope and intercept of the model.
Applies double exponential smoothing.
Parameters: |
|
---|---|
Returns: | The smoothed series values. |
Applies exponential smoothing.
Parameters: |
|
---|---|
Returns: | The smoothed series values. |
Calculates the Fano factor a windowed variance-to-mean ratio.
Parameters: |
|
---|---|
Returns: | The Fano factor. |
See Also
Groups a pandas DataFrame by month.
Parameters: | df – A pandas DataFrame. |
---|---|
Returns: | The grouped DataFrame. |
Groups a pandas DataFrame by the day of year.
Parameters: | df – A pandas DataFrame. |
---|---|
Returns: | The grouped DataFrame. |
Groups a pandas DataFrame by year.
Parameters: | df – A pandas DataFrame. |
---|---|
Returns: | The grouped DataFrame. |
Groups a pandas DataFrame by year and month.
Parameters: | df – A pandas DataFrame. |
---|---|
Returns: | The grouped DataFrame. |
Computes the instaneous phase of a signal.
Parameters: | arr – Array-like list of values. |
---|---|
Returns: | The instaneous phase. |
Looks up the index of a month from a short name.
Parameters: |
|
---|---|
Returns: | The index of the month. |
>>> from dautil import ts
>>> ts.month_index('Jan')
1
Computes the power of a signal.
Parameters: | arr – Array-like list of values. |
---|---|
Returns: | The power of a signal. |
Computes the rolling deviations of a series, by subtracting the rolling mean and dividing by the rolling standard deviation.
Parameters: |
|
---|---|
Returns: | The rolling deviations. |
Looks up the short name of a month with an index.
Parameters: |
|
---|---|
Returns: | The short name of the month for example Jan. |
>>> from dautil import ts
>>> ts.short_month(1)
'Jan'
Gets the short names of the months.
Returns: | A list containing the short month names. |
---|
Creates a sine wave of roughly the same size as the input.
Parameters: | arr – Array-like list of values. |
---|---|
Returns: | A sine wave. |