add a docstring for time filter
This commit is contained in:
parent
cc14e68b44
commit
81af9579dc
1 changed files with 16 additions and 0 deletions
|
|
@ -66,6 +66,22 @@ def _project_lookup_by_id(db: Path, uuid: str) -> list[tuple[str, ...]]:
|
||||||
|
|
||||||
|
|
||||||
def _time_filter(results: pd.DataFrame, created_before: Optional[str]=None, created_after: Optional[Any]=None, updated_before: Optional[Any]=None, updated_after: Optional[Any]=None) -> pd.DataFrame:
|
def _time_filter(results: pd.DataFrame, created_before: Optional[str]=None, created_after: Optional[Any]=None, updated_before: Optional[Any]=None, updated_after: Optional[Any]=None) -> pd.DataFrame:
|
||||||
|
"""
|
||||||
|
Filter the results from the database in terms of the creation and update times.
|
||||||
|
|
||||||
|
Parameters
|
||||||
|
----------
|
||||||
|
results: pd.DataFrame
|
||||||
|
The dataframe holding the unfilteres results from the database.
|
||||||
|
created_before: str
|
||||||
|
Contraint on the creation date in datetime.datetime.isoformat. Note that this is exclusive. The creation date has to be truly before the date and time given.
|
||||||
|
created_after: str
|
||||||
|
Contraint on the creation date in datetime.datetime.isoformat. Note that this is exclusive. The creation date has to be truly after the date and time given.
|
||||||
|
updated_before: str
|
||||||
|
Contraint on the creation date in datetime.datetime.isoformat. Note that this is exclusive. The date of the last update has to be truly before the date and time given.
|
||||||
|
updated_after: str
|
||||||
|
Contraint on the creation date in datetime.datetime.isoformat. Note that this is exclusive. The date of the last update has to be truly after the date and time given.
|
||||||
|
"""
|
||||||
drops = []
|
drops = []
|
||||||
for ind in range(len(results)):
|
for ind in range(len(results)):
|
||||||
result = results.iloc[ind]
|
result = results.iloc[ind]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue