navis.nbl.compress_scores¶
- navis.nbl.compress_scores(scores, threshold=None, digits=None)[source]¶
Compress scores.
This will not necessarily reduce the in-memory footprint but will lead to much smaller file sizes when saved to disk.
- Parameters:
scores (pandas.DataFrame) –
threshold (float, optional) – Scores lower than this will be capped at threshold.
digits (int, optional) – Round scores to the Nth digit.
- Returns:
scores_comp – Copy of the original dataframe with the data cast to 32bit floats and the optional filters (see threshold and digits) applied.
- Return type:
pandas.DataFrame