pandas 1.4.2

ParametersReturnsBackRef
validate_axis_style_args(data, args, kwargs, arg_name, method_name)

In an attempt to handle both :None:None:`.method(index, columns)`, and :None:None:`.method(arg, axis=.)`, we have to do some bad things to argument parsing. This translates all arguments to :None:None:`{index=., columns=.}` style.

Parameters

data : DataFrame
args : tuple

All positional arguments from the user

kwargs : dict

All keyword arguments from the user

arg_name, method_name : str

Used for better error messages

Returns

kwargs : dict

A dictionary of keyword arguments. Doesn't modify kwargs inplace, so update them with the return value here.

Argument handler for mixed index, columns / axis functions

Examples

This example is valid syntax, but we were not able to check execution
>>> df = pd.DataFrame(range(2))
... validate_axis_style_args(df, (str.upper,), {'columns': id},
...  'mapper', 'rename') {'columns': <built-in function id>, 'index': <method 'upper' of 'str' objects>}

This emits a warning >>> validate_axis_style_args(df, (str.upper, id), {}, ... 'mapper', 'rename') {'index': <method 'upper' of 'str' objects>, 'columns': <built-in function id>}

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

pandas.util._validators.validate_axis_style_args

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/util/_validators.py#258
type: <class 'function'>
Commit: