I have code that needs to work on pandas dataframes as well as dask dataframes. Because of this, at various points in the code I need to check the type to determine which methods to use. As far as I can tell, these all seem to do the trick:
isinstance(df, dask.dataframe.DataFrame)
isinstance(df, dask.dataframe.core.DataFrame)
isinstance(df.values, dask.array.Array)
Is one of these preferred? Or is there a better way to perform this check?