ecopipeline 0.6.9__py3-none-any.whl → 0.6.10__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.
@@ -1,4 +1,4 @@
1
- from .transform import rename_sensors, avg_duplicate_times, remove_outliers, ffill_missing, nullify_erroneous, sensor_adjustment, round_time, aggregate_df, join_to_hourly, concat_last_row, join_to_daily, cop_method_1, cop_method_2, create_summary_tables, remove_partial_days,convert_c_to_f,convert_l_to_g, convert_on_off_col_to_bool, flag_dhw_outage,generate_event_log_df,convert_time_zone, shift_accumulative_columns,heat_output_calc, add_relative_humidity, apply_equipment_cop_derate
1
+ from .transform import rename_sensors, avg_duplicate_times, remove_outliers, ffill_missing, nullify_erroneous, sensor_adjustment, round_time, aggregate_df, join_to_hourly, concat_last_row, join_to_daily, cop_method_1, cop_method_2, create_summary_tables, remove_partial_days,convert_c_to_f,convert_l_to_g, convert_on_off_col_to_bool, flag_dhw_outage,generate_event_log_df,convert_time_zone, shift_accumulative_columns,heat_output_calc, add_relative_humidity, apply_equipment_cop_derate, delete_erroneous_from_time_pt
2
2
  from .lbnl import nclarity_filter_new, site_specific, condensate_calculations, gas_valve_diff, gather_outdoor_conditions, aqsuite_prep_time, nclarity_csv_to_df, _add_date, add_local_time, aqsuite_filter_new, get_refrig_charge, elev_correction, change_ID_to_HVAC, get_hvac_state, get_cop_values, get_cfm_values, replace_humidity, create_fan_curves, lbnl_temperature_conversions, lbnl_pressure_conversions, lbnl_sat_calculations, get_site_cfm_info, get_site_info, merge_indexlike_rows
3
3
  from .bayview import calculate_cop_values, aggregate_values, get_energy_by_min, verify_power_energy, get_temp_zones120, get_storage_gals120
4
4
  __all__ = ["rename_sensors", "avg_duplicate_times", "remove_outliers", "ffill_missing", "nullify_erroneous", "sensor_adjustment", "round_time", "aggregate_df", "join_to_hourly", "concat_last_row", "join_to_daily",
@@ -6,4 +6,4 @@ __all__ = ["rename_sensors", "avg_duplicate_times", "remove_outliers", "ffill_mi
6
6
  "nclarity_csv_to_df", "_add_date", "add_local_time", "aqsuite_filter_new", "get_refrig_charge", "elev_correction", "change_ID_to_HVAC", "get_hvac_state", "get_cop_values", "get_cfm_values", "replace_humidity",
7
7
  "create_fan_curves", "lbnl_temperature_conversions", "lbnl_pressure_conversions", "lbnl_sat_calculations", "get_site_cfm_info", "get_site_info", "merge_indexlike_rows", "calculate_cop_values", "aggregate_values",
8
8
  "get_energy_by_min", "verify_power_energy", "get_temp_zones120", "get_storage_gals120","convert_c_to_f","convert_l_to_g", "convert_on_off_col_to_bool", "flag_dhw_outage","generate_event_log_df","convert_time_zone",
9
- "shift_accumulative_columns","heat_output_calc", "add_relative_humidity","apply_equipment_cop_derate"]
9
+ "shift_accumulative_columns","heat_output_calc", "add_relative_humidity","apply_equipment_cop_derate","delete_erroneous_from_time_pt"]
@@ -306,6 +306,35 @@ def ffill_missing(original_df: pd.DataFrame, config : ConfigManager, previous_fi
306
306
  df.apply(_ffill, args=(ffill_df,previous_fill))
307
307
  return df
308
308
 
309
+ def delete_erroneous_from_time_pt(df: pd.DataFrame, time_point : pd.Timestamp, column_names : list, new_value = None) -> pd.DataFrame:
310
+ """
311
+ Function will take a pandas dataframe and delete specified erroneous values at a specified time point.
312
+
313
+ Parameters
314
+ ----------
315
+ df: pd.DataFrame
316
+ Timestamp indexed Pandas dataframe that needs to have an erroneous value removed
317
+ time_point : pd.Timestamp
318
+ The timepoint index the erroneous value takes place in
319
+ column_names : list
320
+ list of column names as strings that contain erroneous values at this time stamp
321
+ new_value : any
322
+ new value to populate the erroneous columns at this timestamp with. If set to None, will replace value with NaN
323
+
324
+ Returns
325
+ -------
326
+ pd.DataFrame:
327
+ Pandas dataframe with error values replaced with new value
328
+ """
329
+ if new_value is None:
330
+ new_value = float('NaN') # Replace with NaN if new_value is not provided
331
+
332
+ if time_point in df.index:
333
+ for col in column_names:
334
+ df.loc[time_point, col] = new_value
335
+
336
+ return df
337
+
309
338
  # TODO test this
310
339
  def nullify_erroneous(original_df: pd.DataFrame, config : ConfigManager) -> pd.DataFrame:
311
340
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecopipeline
3
- Version: 0.6.9
3
+ Version: 0.6.10
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)
@@ -3,15 +3,15 @@ ecopipeline/extract/__init__.py,sha256=3u_CUMdCguVewU3kN8x6xhVNyo1-p-gwTrhjOh7Ps
3
3
  ecopipeline/extract/extract.py,sha256=heWcWTeRVTRITh_1sHVnkaKOOi5PwUOEVIi4k5tw2Z8,43384
4
4
  ecopipeline/load/__init__.py,sha256=oDAVF8AhK_qugqegjW7jK16p-nb9QzKhiNQOkEBniKM,235
5
5
  ecopipeline/load/load.py,sha256=X7JIakIxyjzZbLuUjJ991kcQpyK4cFEZ0Lk36eXBEfI,21506
6
- ecopipeline/transform/__init__.py,sha256=YIE20XukPx-WiJ575PRgSPaCTtgTCiMqmFXPoE_yR1M,2337
6
+ ecopipeline/transform/__init__.py,sha256=7HuovqGHqrw0bZmeSCPMq1SkSRxJY8QBOBhR7y1JdBw,2400
7
7
  ecopipeline/transform/bayview.py,sha256=TP24dnTsUD95X-f6732egPZKjepFLJgDm9ImGr-fppY,17899
8
8
  ecopipeline/transform/lbnl.py,sha256=EQ54G4rJXaZ7pwVusKcdK2KBehSdCsNo2ybphtMGs7o,33400
9
- ecopipeline/transform/transform.py,sha256=E-rvf1MOnlHSRoSpcdffjVbs1vzk_XMIz_xttxAKOxw,44898
9
+ ecopipeline/transform/transform.py,sha256=kcJl6gzOmPx5K5pzcfQq17a5zInW4XfyjtwLxOMNlr4,46004
10
10
  ecopipeline/utils/ConfigManager.py,sha256=t4sfTjGO0g5P50XBQqGVFWaXfAlW1GMDh1DLoBuFGks,9826
11
11
  ecopipeline/utils/__init__.py,sha256=ccWUR0m7gD9DfcgsxBCLOfi4lho6RdYuB2Ugy_g6ZdQ,28
12
12
  ecopipeline/utils/unit_convert.py,sha256=VFh1we2Y8KV3u21BeWb-U3TlZJXo83q5vdxxkpgcuME,3064
13
- ecopipeline-0.6.9.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- ecopipeline-0.6.9.dist-info/METADATA,sha256=awBO9IOMk8QznQCN-hIcWgzWnFVGxJcF-6ABTF6wMG8,2329
15
- ecopipeline-0.6.9.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
16
- ecopipeline-0.6.9.dist-info/top_level.txt,sha256=WOPFJH2LIgKqm4lk2OnFF5cgVkYibkaBxIxgvLgO7y0,12
17
- ecopipeline-0.6.9.dist-info/RECORD,,
13
+ ecopipeline-0.6.10.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
+ ecopipeline-0.6.10.dist-info/METADATA,sha256=7Ru_udzflx21RI3z8s7ZWrXh8bB2-5xXxYNsihAZIlY,2330
15
+ ecopipeline-0.6.10.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
16
+ ecopipeline-0.6.10.dist-info/top_level.txt,sha256=WOPFJH2LIgKqm4lk2OnFF5cgVkYibkaBxIxgvLgO7y0,12
17
+ ecopipeline-0.6.10.dist-info/RECORD,,