MCPcopy
hub / github.com/dask/dask / is_series_like

Function is_series_like

dask/utils.py:1529–1536  ·  view source on GitHub ↗

Looks like a Pandas Series

(s)

Source from the content-addressed store, hash-verified

1527
1528
1529def is_series_like(s) -> bool:
1530 """Looks like a Pandas Series"""
1531 typ = s.__class__
1532 return (
1533 all(hasattr(typ, name) for name in ("groupby", "head", "mean"))
1534 and all(hasattr(s, name) for name in ("dtype", "name"))
1535 and "index" not in typ.__name__.lower()
1536 )
1537
1538
1539def is_index_like(s) -> bool:

Callers 15

apply_and_enforceFunction · 0.90
_renameFunction · 0.90
total_mem_usageFunction · 0.90
idxmaxmin_chunkFunction · 0.90
meta_warningFunction · 0.90
has_known_categoriesFunction · 0.90
clear_known_categoriesFunction · 0.90
check_metaFunction · 0.90
_check_daskFunction · 0.90
assert_dask_dtypesFunction · 0.90
meta_frame_constructorFunction · 0.90
meta_series_constructorFunction · 0.90

Calls 1

allFunction · 0.85

Tested by 2

test_is_dataframe_likeFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…