Commit bfb32c5
Fix ChainedAssignmentError in warm_start_from_old_experiment
Summary:
Pandas 3.0 introduced Copy-on-Write (CoW) which makes chained assignment with `inplace=True` ineffective. The pattern `df["col"].replace(..., inplace=True)` no longer modifies the original DataFrame because the column selection creates a copy.
Replace the chained `inplace=True` pattern with explicit assignment:
- `df["col"].replace(..., inplace=True)` → `df["col"] = df["col"].replace(...)`
This eliminates the `ChainedAssignmentError` warning and ensures the DataFrame is actually modified as intended.
Differential Revision: D911879741 parent b49a247 commit bfb32c5
1 file changed
+4
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1409 | 1409 | | |
1410 | 1410 | | |
1411 | 1411 | | |
1412 | | - | |
1413 | | - | |
| 1412 | + | |
| 1413 | + | |
1414 | 1414 | | |
1415 | | - | |
1416 | | - | |
1417 | | - | |
| 1415 | + | |
| 1416 | + | |
1418 | 1417 | | |
1419 | 1418 | | |
1420 | 1419 | | |
| |||
0 commit comments