ecopipeline 0.9.0__py3-none-any.whl → 0.9.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -184,7 +184,7 @@ def _check_and_add_ratio_alarm(daily_df: pd.DataFrame, alarm_key : str, column_n
184
184
  alarm_daily_df = daily_df.loc[(daily_df[f"{column_name}_{alarm_key}"] < low_bound) | (daily_df[f"{column_name}_{alarm_key}"] > high_bound)]
185
185
  if not alarm_daily_df.empty:
186
186
  for day, values in alarm_daily_df.iterrows():
187
- alarm_str = f"Power ratio alarm: {pretty_name} accounted for {round(values[f'{column_name}_{alarm_key}'], 2)}% of {alarm_key} energy use."
187
+ alarm_str = f"Power ratio alarm: {pretty_name} accounted for {round(values[f'{column_name}_{alarm_key}'], 2)}% of {alarm_key} energy use. {round(low_bound, 2)}-{round(high_bound, 2)}% of {alarm_key} energy use expected."
188
188
  if day in alarms_dict:
189
189
  alarms_dict[day].append([column_name, alarm_str])
190
190
  else:
@@ -396,11 +396,12 @@ def column_name_change(df : pd.DataFrame, dt : pd.Timestamp, new_column : str, o
396
396
  remove_old_column : bool
397
397
  remove old column when done
398
398
  """
399
- if df.index.min() < dt:
400
- mask = df.index < dt
401
- df.loc[mask, new_column] = df.loc[mask, old_column]
402
- if remove_old_column:
403
- df = df.drop(columns=[old_column])
399
+ if old_column in df.columns:
400
+ if df.index.min() < dt:
401
+ mask = df.index < dt
402
+ df.loc[mask, new_column] = df.loc[mask, old_column]
403
+ if remove_old_column:
404
+ df = df.drop(columns=[old_column])
404
405
  return df
405
406
 
406
407
  def heat_output_calc(df: pd.DataFrame, flow_var : str, hot_temp : str, cold_temp : str, heat_out_col_name : str, return_as_kw : bool = True) -> pd.DataFrame:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecopipeline
3
- Version: 0.9.0
3
+ Version: 0.9.2
4
4
  Summary: Contains functions for use in Ecotope Datapipelines
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: GNU General Public License (GPL)
@@ -1,6 +1,6 @@
1
1
  ecopipeline/__init__.py,sha256=d48mO5La6OrQDkRe_qqoY6lUx7x-e8krOH388jmWjwU,218
2
2
  ecopipeline/event_tracking/__init__.py,sha256=hVV2IHyt3pLSIOESpINr8-sQBmK98t7CiVb1IlvE5xQ,84
3
- ecopipeline/event_tracking/event_tracking.py,sha256=WAHyCZtr0UToB3Ll3F9MBXjewy7bIsvS5m7nZ0ljBkw,16901
3
+ ecopipeline/event_tracking/event_tracking.py,sha256=Ti2OJ5cVuBOWEJjgsV0049vHv8941cYusV3Xci2MVuU,16983
4
4
  ecopipeline/extract/__init__.py,sha256=gQ3sak6NJ63Gpo-hZXrtZfeKOTHLRyAVXfTgxxRpqPo,675
5
5
  ecopipeline/extract/extract.py,sha256=i5e-mL4KiJfmWMFnKwvCW_BdPELGJiYKRk6FbvcEi1U,51106
6
6
  ecopipeline/load/__init__.py,sha256=NLa_efQJZ8aP-J0Y5xx9DP7mtfRH9jY6Jz1ZMZN_BAA,292
@@ -8,12 +8,12 @@ ecopipeline/load/load.py,sha256=Ptxr0MOjns_HeVSmZsLLApHJGB-z6XOB2m8LNiVaD7E,2386
8
8
  ecopipeline/transform/__init__.py,sha256=YveBLBsNhfI4qZP04doa0NrTbEKvjDAUDEKtEPdFPfU,2545
9
9
  ecopipeline/transform/bayview.py,sha256=TP24dnTsUD95X-f6732egPZKjepFLJgDm9ImGr-fppY,17899
10
10
  ecopipeline/transform/lbnl.py,sha256=EQ54G4rJXaZ7pwVusKcdK2KBehSdCsNo2ybphtMGs7o,33400
11
- ecopipeline/transform/transform.py,sha256=1s4gtaiP8H6WLasOCntQZrx8Av_Y9pp1YvMnWZm_ya8,49975
11
+ ecopipeline/transform/transform.py,sha256=wL4B00XBwLWVlf7goOLSHKgLFmIsXprQNepGLLO_wTk,50028
12
12
  ecopipeline/utils/ConfigManager.py,sha256=-g1wtExdvhYO5Y6Q3cRbywa__DxRMFruLrB4YanwaPY,12168
13
13
  ecopipeline/utils/__init__.py,sha256=ccWUR0m7gD9DfcgsxBCLOfi4lho6RdYuB2Ugy_g6ZdQ,28
14
14
  ecopipeline/utils/unit_convert.py,sha256=VFh1we2Y8KV3u21BeWb-U3TlZJXo83q5vdxxkpgcuME,3064
15
- ecopipeline-0.9.0.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
- ecopipeline-0.9.0.dist-info/METADATA,sha256=t6AjFnEnFEhp1RV6TiN8N1ROF7H9R_97QlKlO5cl8Oo,2329
17
- ecopipeline-0.9.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
18
- ecopipeline-0.9.0.dist-info/top_level.txt,sha256=WOPFJH2LIgKqm4lk2OnFF5cgVkYibkaBxIxgvLgO7y0,12
19
- ecopipeline-0.9.0.dist-info/RECORD,,
15
+ ecopipeline-0.9.2.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
+ ecopipeline-0.9.2.dist-info/METADATA,sha256=TvfyD5HUMuKdbDYtQZqr4iTg0HSNNMswtLEVXF7AZ-I,2329
17
+ ecopipeline-0.9.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
18
+ ecopipeline-0.9.2.dist-info/top_level.txt,sha256=WOPFJH2LIgKqm4lk2OnFF5cgVkYibkaBxIxgvLgO7y0,12
19
+ ecopipeline-0.9.2.dist-info/RECORD,,