Skip to content

Commit 2406931

Browse files
committed
Filter metrics to include only those from the current hour in coindesk.py
1 parent 9e89c32 commit 2406931

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

metrics/examples/coindesk/coindesk.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ def ingest() -> pd.DataFrame:
6464

6565
df = pd.DataFrame(all_rows)
6666

67+
# Filter out metrics that are not current hour.
68+
df = df[df["metric_name"].str.contains("CURRENT_HOUR")]
69+
6770
# Remove duplicates based on the second-level timestamp and metric name.
6871
df = df.drop_duplicates(subset=["metric_timestamp", "metric_name"])
6972
logger.debug(f"df:\n{df}")

0 commit comments

Comments
 (0)