edisgo.network.timeseries
¶
Module Contents¶
Classes¶
Holds component-specific active and reactive power time series. |
|
Holds raw time series data, e.g. sector-specific demand and standing times of EV. |
- class edisgo.network.timeseries.TimeSeries(**kwargs)[source]¶
Holds component-specific active and reactive power time series.
All time series are fixed time series that in case of flexibilities result after application of a heuristic or optimisation. They can be used for power flow calculations.
Also holds any raw time series data that was used to generate component-specific time series in attribute time_series_raw. See
TimeSeriesRaw
for more information.- Parameters
timeindex (pandas.DatetimeIndex, optional) – Can be used to define a time range for which to obtain the provided time series and run power flow analysis. Default: None.
- time_series_raw¶
Raw time series. See
TimeSeriesRaw
for more information.- Type
- property is_worst_case: bool¶
Time series mode.
Is used to distinguish between normal time series analysis and worst-case analysis. Is determined by checking if the timindex starts before 1971 as the default for worst-case is 1970. Be mindful when creating your own worst-cases.
- Returns
Indicates if current time series is worst-case time series with different assumptions for mv and lv simultaneities.
- Return type
- property timeindex¶
Time index all time-dependent attributes are indexed by.
Is used as default time steps in e.g. power flow analysis.
- Parameters
ind (pandas.DatetimeIndex) – Time index all time-dependent attributes are indexed by.
- Returns
Time index all time-dependent attributes are indexed by.
- Return type
- property generators_active_power¶
Active power time series of generators in MW.
- Parameters
df (pandas.DataFrame) – Active power time series of all generators in topology in MW. Index of the dataframe is a time index and column names are names of generators.
- Returns
Active power time series of all generators in topology in MW for time steps given in
timeindex
. For more information on the dataframe see input parameter df.- Return type
- property generators_reactive_power¶
Reactive power time series of generators in MVA.
- Parameters
df (pandas.DataFrame) – Reactive power time series of all generators in topology in MVA. Index of the dataframe is a time index and column names are names of generators.
- Returns
Reactive power time series of all generators in topology in MVA for time steps given in
timeindex
. For more information on the dataframe see input parameter df.- Return type
- property loads_active_power¶
Active power time series of loads in MW.
- Parameters
df (pandas.DataFrame) – Active power time series of all loads in topology in MW. Index of the dataframe is a time index and column names are names of loads.
- Returns
Active power time series of all loads in topology in MW for time steps given in
timeindex
. For more information on the dataframe see input parameter df.- Return type
- property loads_reactive_power¶
Reactive power time series of loads in MVA.
- Parameters
df (pandas.DataFrame) – Reactive power time series of all loads in topology in MVA. Index of the dataframe is a time index and column names are names of loads.
- Returns
Reactive power time series of all loads in topology in MVA for time steps given in
timeindex
. For more information on the dataframe see input parameter df.- Return type
- property storage_units_active_power¶
Active power time series of storage units in MW.
- Parameters
df (pandas.DataFrame) – Active power time series of all storage units in topology in MW. Index of the dataframe is a time index and column names are names of storage units.
- Returns
Active power time series of all storage units in topology in MW for time steps given in
timeindex
. For more information on the dataframe see input parameter df.- Return type
- property storage_units_reactive_power¶
Reactive power time series of storage units in MVA.
- Parameters
df (pandas.DataFrame) – Reactive power time series of all storage units in topology in MVA. Index of the dataframe is a time index and column names are names of storage units.
- Returns
Reactive power time series of all storage units in topology in MVA for time steps given in
timeindex
. For more information on the dataframe see input parameter df.- Return type
- property residual_load¶
Returns residual load in network.
Residual load for each time step is calculated from total load minus total generation minus storage active power (discharge is positive). A positive residual load represents a load case while a negative residual load here represents a feed-in case. Grid losses are not considered.
- Returns
Series with residual load in MW.
- Return type
- property timesteps_load_feedin_case¶
Contains residual load and information on feed-in and load case.
Residual load is calculated from total (load - generation) in the network. Grid losses are not considered.
Feed-in and load case are identified based on the generation, load and storage time series and defined as follows:
Load case: positive (load - generation - storage) at HV/MV substation
Feed-in case: negative (load - generation - storage) at HV/MV substation
- Returns
Series with information on whether time step is handled as load case (‘load_case’) or feed-in case (‘feed-in_case’) for each time step in
timeindex
.- Return type
- charging_points_active_power(edisgo_object: edisgo.EDisGo)[source]¶
Returns a subset of
loads_active_power
containing only the time series of charging points.- Parameters
edisgo_object (
EDisGo
) –- Returns
Pandas DataFrame with active power time series of charging points.
- Return type
- charging_points_reactive_power(edisgo_object: edisgo.EDisGo)[source]¶
Returns a subset of
loads_reactive_power
containing only the time series of charging points.- Parameters
edisgo_object (
EDisGo
) –- Returns
Pandas DataFrame with reactive power time series of charging points.
- Return type
- reset()[source]¶
Resets all time series.
Active and reactive power time series of all loads, generators and storage units are deleted, as well as timeindex and everything stored in
time_series_raw
.
- set_active_power_manual(edisgo_object, ts_generators=None, ts_loads=None, ts_storage_units=None)[source]¶
Sets given component active power time series.
If time series for a component were already set before, they are overwritten.
- Parameters
edisgo_object (
EDisGo
) –ts_generators (pandas.DataFrame) – Active power time series in MW of generators. Index of the data frame is a datetime index. Columns contain generators names of generators to set time series for.
ts_loads (pandas.DataFrame) – Active power time series in MW of loads. Index of the data frame is a datetime index. Columns contain load names of loads to set time series for.
ts_storage_units (pandas.DataFrame) – Active power time series in MW of storage units. Index of the data frame is a datetime index. Columns contain storage unit names of storage units to set time series for.
- set_reactive_power_manual(edisgo_object, ts_generators=None, ts_loads=None, ts_storage_units=None)[source]¶
Sets given component reactive power time series.
If time series for a component were already set before, they are overwritten.
- Parameters
edisgo_object (
EDisGo
) –ts_generators (pandas.DataFrame) – Reactive power time series in MVA of generators. Index of the data frame is a datetime index. Columns contain generators names of generators to set time series for.
ts_loads (pandas.DataFrame) – Reactive power time series in MVA of loads. Index of the data frame is a datetime index. Columns contain load names of loads to set time series for.
ts_storage_units (pandas.DataFrame) – Reactive power time series in MVA of storage units. Index of the data frame is a datetime index. Columns contain storage unit names of storage units to set time series for.
- set_worst_case(edisgo_object, cases, generators_names=None, loads_names=None, storage_units_names=None)[source]¶
Sets demand and feed-in of loads, generators and storage units for the specified worst cases.
Per default time series are set for all loads, generators and storage units in the network.
Possible worst cases are ‘load_case’ (heavy load flow case) and ‘feed-in_case’ (reverse power flow case). Each case is set up once for dimensioning of the MV grid (‘load_case_mv’/’feed-in_case_mv’) and once for the dimensioning of the LV grid (‘load_case_lv’/’feed-in_case_lv’), as different simultaneity factors are assumed for the different voltage levels.
Assumed simultaneity factors specified in the config section worst_case_scale_factor are used to generate active power demand or feed-in. For the reactive power behavior fixed cosphi is assumed. The power factors set in the config section reactive_power_factor and the power factor mode, defining whether components behave inductive or capacitive, given in the config section reactive_power_mode, are used.
Component specific information is given below:
Generators
Worst case feed-in time series are distinguished by technology (PV, wind and all other) and whether it is a load or feed-in case. In case of generator worst case time series it is not distinguished by whether it is used to analyse the MV or LV. However, both options are generated as it is distinguished in the case of loads. Worst case scaling factors for generators are specified in the config section worst_case_scale_factor through the parameters: ‘feed-in_case_feed-in_pv’, ‘feed-in_case_feed-in_wind’, ‘feed-in_case_feed-in_other’, ‘load_case_feed-in_pv’, load_case_feed-in_wind’, and ‘load_case_feed-in_other’.
For reactive power a fixed cosphi is assumed. A different reactive power factor is used for generators in the MV and generators in the LV. The reactive power factors for generators are specified in the config section reactive_power_factor through the parameters: ‘mv_gen’ and ‘lv_gen’.
Conventional loads
Worst case load time series are distinguished by whether it is a load or feed-in case and whether it used to analyse the MV or LV. Worst case scaling factors for conventional loads are specified in the config section worst_case_scale_factor through the parameters: ‘mv_feed-in_case_load’, ‘lv_feed-in_case_load’, ‘mv_load_case_load’, and ‘lv_load_case_load’.
For reactive power a fixed cosphi is assumed. A different reactive power factor is used for loads in the MV and loads in the LV. The reactive power factors for conventional loads are specified in the config section reactive_power_factor through the parameters: ‘mv_load’ and ‘lv_load’.
Charging points
Worst case demand time series are distinguished by use case (home charging, work charging, public (slow) charging and HPC), by whether it is a load or feed-in case and by whether it used to analyse the MV or LV. Worst case scaling factors for charging points are specified in the config section worst_case_scale_factor through the parameters: ‘mv_feed-in_case_cp_home’, ‘mv_feed-in_case_cp_work’, ‘mv_feed-in_case_cp_public’, and ‘mv_feed-in_case_cp_hpc’, ‘lv_feed-in_case_cp_home’, ‘lv_feed-in_case_cp_work’, ‘lv_feed-in_case_cp_public’, and ‘lv_feed-in_case_cp_hpc’, ‘mv_load-in_case_cp_home’, ‘mv_load-in_case_cp_work’, ‘mv_load-in_case_cp_public’, and ‘mv_load-in_case_cp_hpc’, ‘lv_load-in_case_cp_home’, ‘lv_load-in_case_cp_work’, ‘lv_load-in_case_cp_public’, and ‘lv_load-in_case_cp_hpc’.
For reactive power a fixed cosphi is assumed. A different reactive power factor is used for charging points in the MV and charging points in the LV. The reactive power factors for charging points are specified in the config section reactive_power_factor through the parameters: ‘mv_cp’ and ‘lv_cp’.
Heat pumps
Worst case demand time series are distinguished by whether it is a load or feed-in case and by whether it used to analyse the MV or LV. Worst case scaling factors for heat pumps are specified in the config section worst_case_scale_factor through the parameters: ‘mv_feed-in_case_hp’, ‘lv_feed-in_case_hp’, ‘mv_load_case_hp’, and ‘lv_load_case_hp’.
For reactive power a fixed cosphi is assumed. A different reactive power factor is used for heat pumps in the MV and heat pumps in the LV. The reactive power factors for heat pumps are specified in the config section reactive_power_factor through the parameters: ‘mv_hp’ and ‘lv_hp’.
Storage units
Worst case feed-in time series are distinguished by whether it is a load or feed-in case. In case of storage units worst case time series it is not distinguished by whether it is used to analyse the MV or LV. However, both options are generated as it is distinguished in the case of loads. Worst case scaling factors for storage units are specified in the config section worst_case_scale_factor through the parameters: ‘feed-in_case_storage’ and ‘load_case_storage’.
For reactive power a fixed cosphi is assumed. A different reactive power factor is used for storage units in the MV and storage units in the LV. The reactive power factors for storage units are specified in the config section reactive_power_factor through the parameters: ‘mv_storage’ and ‘lv_storage’.
- Parameters
edisgo_object (
EDisGo
) –cases (list(str)) – List with worst-cases to generate time series for. Can be ‘feed-in_case’, ‘load_case’ or both.
generators_names (list(str)) – Defines for which generators to set worst case time series. If None, time series are set for all generators. Default: None.
loads_names (list(str)) – Defines for which loads to set worst case time series. If None, time series are set for all loads. Default: None.
storage_units_names (list(str)) – Defines for which storage units to set worst case time series. If None, time series are set for all storage units. Default: None.
Notes
Be careful, this function overwrites all previously set time series in the case that these are not worst case time series. If previously set time series are worst case time series is checked using
is_worst_case
.Further, if this function is called for a component whose worst-case time series are already set, they are overwritten, even if previously set time series were set for a different worst-case.
Also be aware that loads for which type information is not set are handled as conventional loads.
- predefined_fluctuating_generators_by_technology(edisgo_object, ts_generators, generator_names=None, timeindex=None, engine=None)[source]¶
Set active power feed-in time series for fluctuating generators by technology.
In case time series are provided per technology and weather cell ID, active power feed-in time series are also set by technology and weather cell ID.
- Parameters
edisgo_object (
EDisGo
) –ts_generators (str or pandas.DataFrame) –
Defines which technology-specific or technology and weather cell specific active power time series to use. Possible options are:
’oedb’
Technology and weather cell specific hourly feed-in time series are obtained from the OpenEnergy DataBase. See
edisgo.io.timeseries_import.feedin_oedb()
for more information.This option requires that the parameter engine is provided in case new ding0 grids with geo-referenced LV grids are used. For further settings, the parameter timeindex can also be provided.
-
DataFrame with self-provided feed-in time series per technology or per technology and weather cell ID normalized to a nominal capacity of 1. In case time series are provided only by technology, columns of the DataFrame contain the technology type as string. In case time series are provided by technology and weather cell ID columns need to be a pandas.MultiIndex with the first level containing the technology as string and the second level the weather cell ID as integer. Index needs to be a pandas.DatetimeIndex.
When importing a ding0 grid and/or using predefined scenarios of the future generator park, each generator has an assigned weather cell ID that identifies the weather data cell from the weather data set used in the research project open_eGo to determine feed-in profiles. The weather cell ID can be retrieved from column weather_cell_id in
generators_df
and could be overwritten to use own weather cells.
generator_names (list(str)) – Defines for which fluctuating generators to use technology-specific time series. If None, all generators for which technology- (and weather cell-) specific time series are provided are used. In case the time series are retrieved from the oedb, all solar and wind generators are used. Default: None.
timeindex (pandas.DatetimeIndex or None) – Specifies time steps for which to set feed-in time series. This parameter is only used in case ts_generators is ‘oedb’. See parameter timeindex in
edisgo.io.timeseries_import.feedin_oedb()
for more information.engine (sqlalchemy.Engine) – Database engine. This parameter is only required in case ts_generators is ‘oedb’ and new ding0 grids with geo-referenced LV grids are used.
- predefined_dispatchable_generators_by_technology(edisgo_object, ts_generators, generator_names=None)[source]¶
Set active power feed-in time series for dispatchable generators by technology.
- Parameters
edisgo_object (
EDisGo
) –ts_generators (pandas.DataFrame) – DataFrame with self-provided active power time series of each type of dispatchable generator normalized to a nominal capacity of 1. Columns contain the technology type as string, e.g. ‘gas’, ‘coal’. Use ‘other’ if you don’t want to explicitly provide a time series for every possible technology. In the current grid existing generator technologies can be retrieved from column type in
generators_df
. Index needs to be a pandas.DatetimeIndex.generator_names (list(str)) – Defines for which dispatchable generators to use technology-specific time series. If None, all dispatchable generators technology-specific time series are provided for are used. In case ts_generators contains a column ‘other’, all dispatchable generators in the network (i.e. all but solar and wind generators) are used.
- predefined_conventional_loads_by_sector(edisgo_object, ts_loads, load_names=None, timeindex=None)[source]¶
Set active power demand time series for conventional loads by sector.
- Parameters
edisgo_object (
EDisGo
) –ts_loads (str or pandas.DataFrame) –
Defines which sector-specific active power time series to use. Possible options are:
’demandlib’
See parameter conventional_loads_ts in
set_time_series_active_power_predefined()
for more information.-
See parameter conventional_loads_ts in
set_time_series_active_power_predefined()
for more information.
load_names (list(str)) – Defines for which conventional loads to use sector-specific time series. If None, all loads of sectors for which sector-specific time series are provided are used. In case the demandlib is used, all loads of sectors ‘residential’, ‘cts’, ‘industrial’, and ‘agricultural’ are used.
timeindex (pandas.DatetimeIndex or None) – Specifies time steps for which to set time series. This parameter is only used in case ts_loads is ‘demandlib’. See parameter timeindex in
edisgo.io.timeseries_import.load_time_series_demandlib()
for more information.
- predefined_charging_points_by_use_case(edisgo_object, ts_loads, load_names=None)[source]¶
Set active power demand time series for charging points by their use case.
- Parameters
edisgo_object (
EDisGo
) –ts_loads (pandas.DataFrame) – DataFrame with self-provided load time series per use case normalized to a nominal power of the charging point of 1. Index needs to be a pandas.DatetimeIndex. Columns contain the use case as string. In the current grid existing use case types can be retrieved from column sector in
loads_df
(make sure to select type ‘charging_point’). When using charging point input from SimBEV the differentiated use cases are ‘home’, ‘work’, ‘public’ and ‘hpc’.load_names (list(str)) – Defines for which charging points to use use-case-specific time series. If None, all charging points of use cases for which use-case-specific time series are provided are used.
- fixed_cosphi(edisgo_object, generators_parametrisation=None, loads_parametrisation=None, storage_units_parametrisation=None)[source]¶
Sets reactive power of specified components assuming a fixed power factor.
Overwrites reactive power time series in case they already exist.
- Parameters
generators_parametrisation (str or pandas.DataFrame or None) –
Sets fixed cosphi parameters for generators. Possible options are:
’default’
Default configuration is used for all generators in the grid. To this end, the power factors set in the config section reactive_power_factor and the power factor mode, defining whether components behave inductive or capacitive, given in the config section reactive_power_mode, are used.
-
DataFrame with fix cosphi parametrisation for specified generators. Columns are:
- ’components’list(str)
List with generators to apply parametrisation for.
- ’mode’str
Defines whether generators behave inductive or capacitive. Possible options are ‘inductive’, ‘capacitive’ or ‘default’. In case of ‘default’, configuration from config section reactive_power_mode is used.
- ’power_factor’float or str
Defines the fixed cosphi power factor. The power factor can either be directly provided as float or it can be set to ‘default’, in which case configuration from config section reactive_power_factor is used.
Index of the dataframe is ignored.
None
No reactive power time series are set.
Default: None.
loads_parametrisation (str or pandas.DataFrame or None) – Sets fixed cosphi parameters for loads. The same options as for parameter generators_parametrisation apply.
storage_units_parametrisation (str or pandas.DataFrame or None) – Sets fixed cosphi parameters for storage units. The same options as for parameter generators_parametrisation apply.
Notes
This function requires active power time series to be previously set.
- reduce_memory(attr_to_reduce=None, to_type='float32', time_series_raw=True, **kwargs)[source]¶
Reduces size of dataframes to save memory.
See
reduce_memory
for more information.- Parameters
attr_to_reduce (list(str), optional) – List of attributes to reduce size for. Per default, all active and reactive power time series of generators, loads, and storage units are reduced.
to_type (str, optional) – Data type to convert time series data to. This is a tradeoff between precision and memory. Default: “float32”.
time_series_raw (bool, optional) – If True raw time series data in
time_series_raw
is reduced as well. Default: True.attr_to_reduce_raw (list(str), optional) – List of attributes in
TimeSeriesRaw
to reduce size for. Seereduce_memory
for default.
- to_csv(directory, reduce_memory=False, time_series_raw=False, **kwargs)[source]¶
Saves component time series to csv.
Saves the following time series to csv files with the same file name (if the time series dataframe is not empty):
loads_active_power and loads_reactive_power
generators_active_power and generators_reactive_power
storage_units_active_power and storage_units_reactive_power
If parameter time_series_raw is set to True, raw time series data is saved to csv as well. See
to_csv
for more information.- Parameters
directory (str) – Directory to save time series in.
reduce_memory (bool, optional) – If True, size of dataframes is reduced using
reduce_memory
. Optional parameters ofreduce_memory
can be passed as kwargs to this function. Default: False.time_series_raw (bool, optional) – If True raw time series data in
time_series_raw
is saved to csv as well. Per default all raw time series data is then stored in a subdirectory of the specified directory called “time_series_raw”. Further, if reduce_memory is set to True, raw time series data is reduced as well. To change this default behavior please callto_csv
separately. Default: False.kwargs – Kwargs may contain arguments of
reduce_memory
.
- from_csv(data_path, dtype=None, time_series_raw=False, from_zip_archive=False, **kwargs)[source]¶
Restores time series from csv files.
See
to_csv()
for more information on which time series can be saved and thus restored.- Parameters
data_path (str) – Data path time series are saved in. Must be a directory or zip archive.
dtype (str, optional) – Numerical data type for data to be loaded from csv. E.g. “float32”. Default: None.
time_series_raw (bool, optional) – If True raw time series data is as well read in (see
from_csv
for further information). Directory data is restored from can be specified through kwargs. Default: False.from_zip_archive (bool, optional) – Set True if data is archived in a zip archive. Default: False.
directory_raw (str, optional) – Directory to read raw time series data from. Per default this is a subdirectory of the specified directory called “time_series_raw”.
- check_integrity()[source]¶
Check for NaN, duplicated indices or columns and if time series is empty.
- drop_component_time_series(df_name, comp_names)[source]¶
Drops component time series if they exist.
- Parameters
df_name (str) – Name of attribute of given object holding the dataframe to remove columns from. Can e.g. be “generators_active_power” if time series should be removed from
generators_active_power
.comp_names (str or list(str)) – Names of components to drop.
- add_component_time_series(df_name, ts_new)[source]¶
Add component time series by concatenating existing and provided dataframe.
Possibly already component time series are dropped before appending newly provided time series using
drop_component_time_series
.- Parameters
df_name (str) – Name of attribute of given object holding the dataframe to add columns to. Can e.g. be “generators_active_power” if time series should be added to
generators_active_power
.ts_new (pandas.DataFrame) – Dataframe with new time series to add to existing time series dataframe.
- resample(method: str = 'ffill', freq: str | pd.Timedelta = '15min')[source]¶
Resamples all generator, load and storage time series to a desired resolution.
See
resample_timeseries
for more information.- Parameters
method (str, optional) – See
resample_timeseries
for more information.freq (str, optional) – See
resample_timeseries
for more information.
- scale_timeseries(p_scaling_factor: float = 1.0, q_scaling_factor: float = 1.0)[source]¶
Scales component time series by given factors.
The changes are directly applied to the TimeSeries object.
- Parameters
p_scaling_factor (float) – Scaling factor to use for active power time series. Values between 0 and 1 will scale down the time series and values above 1 will scale the timeseries up. Default: 1.
q_scaling_factor (float) – Scaling factor to use for reactive power time series. Values between 0 and 1 will scale down the time series and values above 1 will scale the timeseries up. Default: 1.
- class edisgo.network.timeseries.TimeSeriesRaw[source]¶
Holds raw time series data, e.g. sector-specific demand and standing times of EV.
Normalised time series are e.g. sector-specific demand time series or technology-specific feed-in time series. Time series needed for flexibilities are e.g. heat time series or curtailment time series.
- q_control¶
Dataframe with information on applied reactive power control or in case of conventional loads assumed reactive power behavior. Index of the dataframe are the component names as in index of
generators_df
,loads_df
, andstorage_units_df
. Columns are “type” with the type of Q-control applied (can be “fixed_cosphi”, “cosphi(P)”, or “Q(V)”), “power_factor” with the (maximum) power factor, “q_sign” giving the sign of the reactive power (only applicable to “fixed_cosphi”), “parametrisation” with the parametrisation of the respective Q-control (only applicable to “cosphi(P)” and “Q(V)”).- Type
- fluctuating_generators_active_power_by_technology¶
DataFrame with feed-in time series per technology or technology and weather cell ID normalized to a nominal capacity of 1. Columns can either just contain the technology type as string or be a pandas.MultiIndex with the first level containing the technology as string and the second level the weather cell ID as integer. Index is a pandas.DatetimeIndex.
- Type
- dispatchable_generators_active_power_by_technology¶
DataFrame with feed-in time series per technology normalized to a nominal capacity of 1. Columns contain the technology type as string. Index is a pandas.DatetimeIndex.
- Type
- conventional_loads_active_power_by_sector¶
DataFrame with load time series of each type of conventional load normalized to an annual consumption of 1. Index needs to be a pandas.DatetimeIndex. Columns represent load type. In ding0 grids the differentiated sectors are ‘residential’, ‘cts’, ‘industrial’, and ‘agricultural’.
- Type
- charging_points_active_power_by_use_case¶
DataFrame with charging demand time series per use case normalized to a nominal capacity of 1. Columns contain the use case as string. Index is a pandas.DatetimeIndex.
- Type
- reduce_memory(attr_to_reduce=None, to_type='float32')[source]¶
Reduces size of dataframes to save memory.
See
reduce_memory
for more information.- Parameters
attr_to_reduce (list(str), optional) – List of attributes to reduce size for. Attributes need to be dataframes containing only time series. Per default the following attributes are reduced if they exist: q_control, fluctuating_generators_active_power_by_technology, dispatchable_generators_active_power_by_technology, conventional_loads_active_power_by_sector, charging_points_active_power_by_use_case.
to_type (str, optional) – Data type to convert time series data to. This is a tradeoff between precision and memory. Default: “float32”.
- to_csv(directory, reduce_memory=False, **kwargs)[source]¶
Saves time series to csv.
Saves all attributes that are set to csv files with the same file name. See class definition for possible attributes.
- Parameters
directory (str) – Directory to save time series in.
reduce_memory (bool, optional) – If True, size of dataframes is reduced using
reduce_memory
. Optional parameters ofreduce_memory
can be passed as kwargs to this function. Default: False.kwargs – Kwargs may contain optional arguments of
reduce_memory
.