Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions streamz/dataframe/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
def is_dataframe_like(df):
""" Looks like a Pandas DataFrame. ** Borrowed from dask.dataframe.utils ** """
typ = type(df)
return (all(hasattr(typ, name)
for name in ('groupby', 'head', 'merge', 'mean'))
and all(hasattr(df, name) for name in ('dtypes',))
and not any(hasattr(typ, name)
for name in ('value_counts', 'dtype')))
return (
all(hasattr(typ, name) for name in ("groupby", "head", "merge", "mean"))
and all(hasattr(df, name) for name in ("dtypes", "columns"))
and not any(hasattr(typ, name) for name in ("name", "dtype"))
)


def is_series_like(s):
Expand Down