Skip to content

Commit ed22a08

Browse files
committed
Fix pandas warning on chained indexing
1 parent 87f8895 commit ed22a08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server/pipeline/match_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def start(connection, added_or_updated_rows):
5151
"Source {} with ID {} is matching multiple groups in pdp_contacts ({})"
5252
.format(row["source_type"], row["source_id"], str(row_matches["matching_id"].drop_duplicates()))
5353
)
54-
items_to_update["matching_id"][row_num] = row_group
54+
items_to_update.loc[row_num, "matching_id"] = row_group
5555
# Updating local pdp_contacts dataframe instead of a roundtrip to postgres within the loop.
5656
# Indexing by iloc and vector of rows to keep the pd.DataFrame class and avoid implicit
5757
# casting to a single-typed pd.Series.

0 commit comments

Comments
 (0)