filter

Scores.filter(conditional: Callable[[Score], bool]) Scores[source]

Filters the scores container.

Args:
conditional (callable):

A callable that evaluates to a boolean for a given item.

Returns:
getml.pipeline.Scores:

A container of filtered scores.

Example:
from datetime import datetime, timedelta

one_week_ago = datetime.today() - timedelta(days=7)

scores_last_week = pipe.scores.filter(lambda score: score.date_time >= one_week_ago)