|
1 | 1 | _chained_assignment_msg = ( |
2 | | - "A value is trying to be set on a copy of a DataFrame or Series " |
| 2 | + "A value is being set on a copy of a DataFrame or Series " |
3 | 3 | "through chained assignment.\n" |
4 | 4 | "Such chained assignment never works to update the original DataFrame or " |
5 | 5 | "Series, because the intermediate object on which we are setting values " |
|
13 | 13 |
|
14 | 14 |
|
15 | 15 | _chained_assignment_method_msg = ( |
16 | | - "A value is trying to be set on a copy of a DataFrame or Series " |
| 16 | + "A value is being set on a copy of a DataFrame or Series " |
17 | 17 | "through chained assignment using an inplace method.\n" |
18 | 18 | "Such inplace method never works to update the original DataFrame or Series, " |
19 | 19 | "because the intermediate object on which we are setting values always " |
|
26 | 26 | "https://pandas.pydata.org/pandas-docs/stable/user_guide/" |
27 | 27 | "copy_on_write.html" |
28 | 28 | ) |
| 29 | + |
| 30 | + |
| 31 | +_chained_assignment_method_update_msg = ( |
| 32 | + "A value is being set on a copy of a DataFrame or Series " |
| 33 | + "through chained assignment using an inplace method.\n" |
| 34 | + "Such inplace method never works to update the original DataFrame or Series, " |
| 35 | + "because the intermediate object on which we are setting values always " |
| 36 | + "behaves as a copy (due to Copy-on-Write).\n\n" |
| 37 | + "For example, when doing 'df[col].update(other)', try " |
| 38 | + "using 'df.update({col: other})' instead, to perform " |
| 39 | + "the operation inplace on the original object.\n\n" |
| 40 | + "See the documentation for a more detailed explanation: " |
| 41 | + "https://pandas.pydata.org/pandas-docs/stable/user_guide/" |
| 42 | + "copy_on_write.html" |
| 43 | +) |
0 commit comments