helpers¶
Helpers: constants and functions for motorized individual travel
-
read_simbev_metadata_file
(scenario_name, section)[source]¶ Read metadata of simBEV run
Parameters: - scenario_name (str) – Scenario name
- section (str) – Metadata section to be returned, one of * “tech_data” * “charge_prob_slow” * “charge_prob_fast”
Returns: pd.DataFrame – Config data
-
reduce_mem_usage
(df: pandas.core.frame.DataFrame, show_reduction: bool = False) → pandas.core.frame.DataFrame[source]¶ Function to automatically check if columns of a pandas DataFrame can be reduced to a smaller data type. Source: https://www.mikulskibartosz.name/how-to-reduce-memory-usage-in-pandas/
Parameters: - df (pd.DataFrame) – DataFrame to reduce memory usage on
- show_reduction (bool) – If True, print amount of memory reduced
Returns: pd.DataFrame – DataFrame with memory usage decreased