Akce
DatasetProcessing » Historie » Revize 2
« Předchozí |
Revize 2/10
(rozdíl)
| Další »
Petr Hlaváč, 2020-05-06 10:11
DatasetProcessing¶
Složka obsahuje implementace processoru pro jednotlivé datasety. Processory jsou dynamicky importovány je tedy proto nutné dodržet pojemnování "dataset-name"Processor.py.
Je velmi žádoucí aby crawler pro stažení souboru používal funkci CSVutils.export_data_to_csv(filename, date_dict).
Po implementování metody je nutné změnit Return False na Return True
Generovaný Processor¶
from Utilities.CSV import CSVDataLine def process_file(filename): """ Method that take path to crawled file and outputs date dictionary: Date dictionary is a dictionary where keys are dates in format ddmmYYYYhh (0804201815) and value is dictionary where keys devices (specified in configuration file) and value is CSVDataLine.CSVDataLine with device,date and occurrence Args: filename: name of processed file Returns: None if not implemented date_dict when implemented """ date_dict = dict() #with open(filename, "r") as file: print("You must implements process_file method first!") return None
Aktualizováno uživatelem Petr Hlaváč před téměř 5 roky(ů) · 2 revizí