def is_series(data):
    """
    Checks whether the supplied data is of Series type.
    """
    dd = None
    if 'dask' in sys.modules:
        import dask.dataframe as dd
    return((pd is not None and isinstance(data, pd.Series)) or
          (dd is not None and isinstance(data, dd.Series)))
def is_series ( data ) : dd = None if 'dask' in sys . modules : import dask . dataframe as dd return ( ( pd is not None and isinstance ( data , pd . Series ) ) or ( dd is not None and isinstance ( data , dd . Series ) ) )
Checks whether the supplied data is of Series type.