@@ -3870,23 +3870,27 @@ def _get_value(self, index, col, takeable: bool = False) -> Scalar:
3870
3870
3871
3871
def isetitem (self , loc , value ) -> None :
3872
3872
"""
3873
- Set the given value in the column with position ' loc' .
3873
+ Set the given value in the column with position ` loc` .
3874
3874
3875
- This is a positional analogue to __setitem__.
3875
+ This is a positional analogue to `` __setitem__`` .
3876
3876
3877
3877
Parameters
3878
3878
----------
3879
3879
loc : int or sequence of ints
3880
+ Index position for the column.
3880
3881
value : scalar or arraylike
3882
+ Value(s) for the column.
3881
3883
3882
3884
Notes
3883
3885
-----
3884
- Unlike `frame.iloc[:, i] = value`, `frame.isetitem(loc, value)` will
3885
- _never_ try to set the values in place, but will always insert a new
3886
- array.
3887
-
3888
- In cases where `frame.columns` is unique, this is equivalent to
3889
- `frame[frame.columns[i]] = value`.
3886
+ ``frame.isetitem(loc, value)`` is an in-place method as it will
3887
+ modify the DataFrame in place (not returning a new object). In contrast to
3888
+ ``frame.iloc[:, i] = value`` which will try to update the existing values in
3889
+ place, ``frame.isetitem(loc, value)`` will not update the values of the column
3890
+ itself in place, it will instead insert a new array.
3891
+
3892
+ In cases where ``frame.columns`` is unique, this is equivalent to
3893
+ ``frame[frame.columns[i]] = value``.
3890
3894
"""
3891
3895
if isinstance (value , DataFrame ):
3892
3896
if is_scalar (loc ):
0 commit comments