“Stat: Data Cleanup for HTC (Point Calculation)” Module

A post-processing module cleaning update csv collect from HTC The generated table and unit dictionary will be used in notebook

class panpython.sdk.stat.data_cleanup_for_htc_point.HtcPointInterpreter(csv_path)[source]

Bases: object

A cleanup instance for post-process of merged HTC data

Parameters

csv_path (str) – a full path to csv file

Examples

>>> from panpython.sdk.stat.data_cleanup_for_htc_point import HtcPointInterpreter
>>> data_file = './output/merged_default.table.csv'
>>> default_interpreter = HtcPointInterpreter(data_file)
>>>
>>> default_table = pd.DataFrame()
>>> default_units = {}
>>> try:
>>>     default_table, default_units = default_interpreter.get_table_and_units()
>>>     print(data_file, 'is loaded')
>>> except FileNotFoundError as e:
>>> print(e)
get_table_and_units()Tuple[pandas.core.frame.DataFrame, dict][source]

Get units dict and a DataFrame table without units

Returns

  • pd.DataFrame – The table after cleanup

  • dict – The units dictionary of the table