Closed komape closed 1 year ago
Rebased branch on master.
Rebased on master and resolved conflicts.
- Should
unit
anddenominator
be included in dataframes? (Timeseries.to_df()
How would you add them?
- Should
unit
anddenominator
be included in dataframes? (Timeseries.to_df()
How would you add them?
I don't know if we want to add it, but I think it makes sense considering we include curve names (which includes unit pre-conversion) in the columns.
One option to include the unit is to append it to name
in Timeseriesto_dataframe()
. That way we don't have to change each of the different dataframe methods (e.g., _timeseries_to_dataframe_value_single_header
, _timeseries_to_dataframe_scenarios
).
if name is None:
name = timeseries.name
include_instance = True
else:
include_instance = False
if timeseries.unit is not None:
name = f"{name}, unit: {timeseries.unit}"
# If denominator can be set while unit is not, tab the statement below one step out
if timeseries.denominator is not None:
name = f"{name}, denominator: {timeseries.denominator}"
@jonmd What do you think?
Please have a look at https://github.com/energyquantified/eq-python-client/issues/66#issuecomment-1525043630
Closes #66.