Unique Detections ID¶
Adds the uniquecid column to your input file. The uniquecid column assigns every detection record a unique numerical value. This column is needed in order to perform operations, such as filter and compression functions.
The code below will add a unique detection ID column and return the Pandas dataframe.
from resonate.uniqueid import add_unqdetecid
input_file = '/path/to/detections.csv'
unqdet_det = add_unqdetecid(input_file);
You can use the Pandas DataFrame.to_csv() function to output the
file to a desired location.
unqdet_det.to_csv('/path/to/output.csv', index=False)
Unique Detections Function¶
-
uniqueid.add_unqdetecid(input_file, encoding='utf-8-sig')¶ Adds the unqdetecid column to an input csv file. The resulting file is returned as a pandas DataFrame object.
Parameters: - input_file – Path to the input csv file.
- encoding – source encoding for the input file (Default utf8-bom)
Returns: padnas DataFrame including unqdetecid column.