pandas 1.4.2

Parameters
assert_categorical_equal(left, right, check_dtype=True, check_category_order=True, obj='Categorical')

Parameters

left : Categorical
right : Categorical
check_dtype : bool, default True

Check that integer dtype of the codes are the same.

check_category_order : bool, default True

Whether the order of the categories should be compared, which implies identical integer codes. If False, only the resulting values are compared. The ordered attribute is checked regardless.

obj : str, default 'Categorical'

Specify object name being compared, internally used to show appropriate assertion message.

Test that Categoricals are equivalent.

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/_testing/asserters.py#536
type: <class 'function'>
Commit: