Skip to content

Commit 9a9b423

Browse files
committed
changehc: convert chained assignment to .loc
1 parent 47bfd62 commit 9a9b423

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

changehc/delphi_changehc/load_data.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ def load_chng_data(filepath, dropdate, base_geo,
6060
]
6161

6262
# counts between 1 and 3 are coded as "3 or less", we convert to 1
63-
data[counts_col][
64-
data[counts_col] == "3 or less"
65-
] = "1"
63+
data.loc[data[counts_col] == "3 or less", counts_col] = "1"
6664
data[counts_col] = data[counts_col].astype(int)
6765

6866
assert (

0 commit comments

Comments
 (0)