check if this works with a pandas DataFrame or series