pandas 1.4.2

Parameters
_check_setitem_copy(self, t='setting', force=False)

Parameters

t : str, the type of setting error
force : bool, default False

If True, then force showing an error.

validate if we are doing a setitem on a chained copy. :
It is technically possible to figure out that we are setting on :
a copy even WITH a multi-dtyped pandas object. In other words, some :
blocks may be views while other are not. Currently _is_view will ALWAYS :
return False for multi-blocks to avoid having to handle this case. :
df = DataFrame(np.arange(0,9), columns=['count']) :
df['group'] = 'b' :
# This technically need not raise SettingWithCopy if both are view :
# (which is not generally guaranteed but is usually True. However, :
# this is in general not a good practice and we recommend using .loc. :
df.iloc[0:5]['group'] = 'a' :

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /pandas/core/generic.py#3948
type: <class 'function'>
Commit: