nrgpy.quality package#
Submodules#
nrgpy.quality.quality module#
- nrgpy.quality.quality.check_for_missing_txt_files(txt_file_names)[source]#
check list of files for missing file numbers
- Parameters:
- txt_file_nameslist
list of SymphoniePRO text file exports
- Returns:
- list
“missing” text file numbers
- nrgpy.quality.quality.check_intervals(df, verbose=True, return_info=False, show_all_missing_timestamps=False, interval='')[source]#
checks for missing intervals in a pandas dataframe with a “Timestamp” column
- Parameters:
- dfobject
the dataframe to be checked
- intervalint
[deprecated] the averaging interval in seconds
- verbosebool
print results to terminal; False to skip
- return_infobool
set to True to return dict with below values
- show_all_missing_timestampsbool
set to True to show all missing timestamps in verbose option. otherwise, shows first and last 3.
- Returns:
- dict
- actual_rowsint
actual number of rows in data section of export file (1 subtracted for column headers)
- expected_rowsint
expected number of rows (assumes 10 min. AVG), converts result to whole integer
- time_rangestr
range of time represented in export file
- first_intervalstr
file starting timestamp
- last_intervalstr
file ending timestamp
- missing_timestampslist
a list of missing timestamps
Examples
ex. pass a reader.data dataframe for an interval check:
>>> reader = nrgpy.sympro_txt_read() instance created, no filename specified >>> reader.concat_txt(txt_dir="C:/data/sympro_data/000110/") ... >>> nrgpy.check_intervals(reader.data, interval=600) Starting timestamp : 2019-01-01 00:00:00 Ending timestamp : 2019-07-01 04:50:00 Data set Duration : 181 days, 4:50:00 Expected rows in data set : 26093 Actual rows in data set : 26093 Data set complete.
- nrgpy.quality.quality.find_missing_intervals(__df, interval)[source]#
find gaps in data dataframe
- Returns:
- list
a list of all missing intervals