BaseDatafier
BaseDatafier
Contains data preparation modules, which includes interpolation. data should be in this format where time is set to index Example:
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
DataFrame
|
The data to be prepared, should be in this format where time is set to index |
required |
time_format
|
str
|
Index datetime format |
required |
ip_freq
|
str
|
Interpolation frequency |
required |
add_var(row_var=None, col_var=None)
Adds additional variables to the data, both row and column wise.
Row wise data format: The index should be equal to that of the actual data.
Column wise data format: The index should be equal to the columns of the actual data.Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
row_var
|
DataFrame
|
Dataframe containing variables related to time, by default None |
None
|
col_var
|
DataFrame
|
Dataframe containing variables related to columns, by default None |
None
|
interpolate_even(data, freq, method='linear')
Interpolates the given dataframe according to the frequency
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
DataFrame
|
Dataframe containing the data |
required |
freq
|
str
|
Interpolation frequency |
required |
method
|
str
|
Interpolation method, by default "linear" |
'linear'
|
Returns:
| Type | Description |
|---|---|
tuple[DataFrame, DataFrame]
|
Interpolated dataframe and Preinterpolated skeleton dataframe |
interpolate_data(data, ip_freq, ip_method)
Interpolates the raw data
Returns:
| Type | Description |
|---|---|
DataFrame
|
Interpolated data |