brightwind.load.load.load_cleaning_file¶
-
brightwind.load.load.
load_cleaning_file
(filepath, date_from_col_name='Start', date_to_col_name='Stop', **kwargs)¶ Load a cleaning file which contains a list of sensor names with corresponding periods of flagged data. This file is a simple comma separated file with the sensor name along with the start and end timestamps for the flagged period. There may be other columns in the file however these will be ignores. E.g.: | Sensor | Start | Stop —————————————————- | Spd80m | 2018-10-23 12:30:00 | 2018-10-25 14:20:00 | Dir78m | 2018-12-23 02:40:00 |
- Parameters
filepath (str) – File path of the file which contains the the list of sensor names along with the start and end timestamps of the periods that are flagged.
date_from_col_name (str, default 'Start') – The column name of the date_from or the start date of the period to be cleaned.
date_to_col_name (str, default 'Stop') – The column name of the date_to or the end date of the period to be cleaned.
kwargs – All the kwargs from pandas.read_csv can be passed to this function.
- Returns
A DataFrame where each row contains the sensor name and the start and end timestamps of the flagged data.
- Return type
pandas.DataFrame
Example usage
import brightwind as bw cleaning_file = r'C:\some\folder\cleaning_file.csv' cleaning_df = bw.load_cleaning_file(cleaning_file) print(cleaning_df)