BaseDatafier
BaseDatafier
Contains data preparation modules, which includes interpolation. data should be in this format where time is set to index
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
pd.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 |
pd.DataFrame
|
Dataframe containing variables related to time, by default None |
None
|
col_var |
pd.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 |
pd.DataFrame
|
Dataframe containing the data |
required |
freq |
str
|
Interpolation frequency |
required |
method |
str
|
Interpolation method, by default "linear" |
'linear'
|
Returns:
Type | Description |
---|---|
pd.DataFrame
|
Interpolated dataframe |
interpolate_data()
Interpolates the raw data
Returns:
Type | Description |
---|---|
pd.DataFrame
|
Interpolated data |