Skip to content

Commit d275877

Browse files
committed
fix: replace pd.NA with np.NaN for consistency in DataFrame null types boolean comparison
1 parent 83cbe75 commit d275877

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/mavedb/routers/score_sets.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from datetime import date, datetime
55
from typing import Any, List, Literal, Optional, Sequence, TypedDict, Union
66

7+
import numpy as np
78
import pandas as pd
89
import requests
910
from arq import ArqRedis
@@ -122,7 +123,7 @@ async def enqueue_variant_creation(
122123
}
123124
existing_scores_df = pd.DataFrame(
124125
variants_to_csv_rows(item.variants, columns=score_columns, namespaced=False)
125-
).replace("NA", pd.NA)
126+
).replace("NA", np.NaN)
126127

127128
# create CSV from existing variants on the score set if no new dataframe provided
128129
existing_counts_df = None
@@ -133,7 +134,7 @@ async def enqueue_variant_creation(
133134
}
134135
existing_counts_df = pd.DataFrame(
135136
variants_to_csv_rows(item.variants, columns=count_columns, namespaced=False)
136-
).replace("NA", pd.NA)
137+
).replace("NA", np.NaN)
137138

138139
# Await the insertion of this job into the worker queue, not the job itself.
139140
# Uses provided score and counts dataframes and metadata files, or falls back to existing data on the score set if not provided.

0 commit comments

Comments
 (0)