pandas 1.4.2

ParametersRaisesReturns
_validate_or_indexify_columns(content: 'list[np.ndarray]', columns: 'Index | None') -> 'Index'

Parameters

content : list of np.ndarrays
columns : Index or None

Raises

1. AssertionError when content is not composed of list of lists, and if

length of columns is not equal to length of content.

2. ValueError when content is list of lists, but length of each sub-list

is not equal

3. ValueError when content is list of lists, but length of sub-list is

not equal to length of content

Returns

Index

If columns is None, assign positional column index value as columns.

If columns is None, make numbers as column names; Otherwise, validate that columns have valid length.

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/internals/construction.py#993
type: <class 'function'>
Commit: