MCPcopy Create free account
hub / github.com/dask/dask / _is_column_label_reference

Function _is_column_label_reference

dask/dataframe/dask_expr/_shuffle.py:658–669  ·  view source on GitHub ↗

Test whether a key is a column label reference To be considered a column label reference, `key` must match the name of at least one column.

(df, key)

Source from the content-addressed store, hash-verified

656
657
658def _is_column_label_reference(df, key):
659 """
660 Test whether a key is a column label reference
661
662 To be considered a column label reference, `key` must match the name of at
663 least one column.
664 """
665 return (
666 not isinstance(key, Expr)
667 and (np.isscalar(key) or pd.api.types.is_scalar(key) or isinstance(key, tuple))
668 and key in df.columns
669 )
670
671
672def _contains_index_name(df, columns_or_index):

Callers 1

_select_columns_or_indexFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected