Looks like a Pandas Series
(s)
| 1527 | |
| 1528 | |
| 1529 | def 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 | |
| 1539 | def is_index_like(s) -> bool: |
searching dependent graphs…