@@ -2,18 +2,18 @@ def is_dataframe_like(df):
22 """ Looks like a Pandas DataFrame. ** Borrowed from dask.dataframe.utils ** """
33 typ = type (df )
44 return (all (hasattr (typ , name )
5- for name in ('groupby' , 'head' , 'merge' , 'mean' )) and
6- all (hasattr (df , name ) for name in ('dtypes' ,)) and not
7- any (hasattr (typ , name )
8- for name in ('value_counts' , 'dtype' )))
5+ for name in ('groupby' , 'head' , 'merge' , 'mean' )
6+ and all (hasattr (df , name ) for name in ('dtypes' ,))
7+ and not any (hasattr (typ , name )
8+ for name in ('value_counts' , 'dtype' ))))
99
1010
1111def is_series_like (s ):
1212 """ Looks like a Pandas Series. ** Borrowed from dask.dataframe.utils ** """
1313 typ = type (s )
14- return (all (hasattr (typ , name ) for name in ('groupby' , 'head' , 'mean' )) and
15- all (hasattr (s , name ) for name in ('dtype' , 'name' )) and
16- 'index' not in typ .__name__ .lower ())
14+ return (all (hasattr (typ , name ) for name in ('groupby' , 'head' , 'mean' ))
15+ and all (hasattr (s , name ) for name in ('dtype' , 'name' ))
16+ and 'index' not in typ .__name__ .lower ())
1717
1818
1919def is_index_like (s ):
0 commit comments