saeyslab / napari-sparrow

Other
17 stars 0 forks source link

pandas version 2.1.0 #134

Closed ArneDefauw closed 9 months ago

ArneDefauw commented 1 year ago

When trying to upgrade pandas to version 2.1.0, this line:

https://github.com/saeyslab/napari-sparrow/blob/0f7945ccbf153bf32bc87dd3ecd44c7cfac91d54/src/napari_sparrow/table/_allocation.py#L102

raises the Error

@wraps(func)
def wrapper(self, *args, **kwargs):
    if isinstance(self, DataFrameGroupBy):
        maybe_raise = not (
            func.__name__ == "agg"
            and len(args) > 0
            and args[0] not in NUMERIC_ONLY_NOT_IMPLEMENTED
        )
        if maybe_raise:
            numeric_only = kwargs.get("numeric_only", no_default)
            # Prior to `pandas=1.5`, `numeric_only` support wasn't uniformly supported
            # in pandas. We don't support `numeric_only=False` in this case.
            if not PANDAS_GE_150 and numeric_only is False:
                raise NotImplementedError(
                    "'numeric_only=False' is not implemented in Dask."
                )
            if not self._all_numeric():
                if numeric_only is False or (
                    PANDAS_GE_200 and numeric_only is no_default
                ):
                  raise NotImplementedError(

"'numeric_only=False' is not implemented in Dask." ) E NotImplementedError: 'numeric_only=False' is not implemented in Dask.

Temporary fix is pinning pandas to 1.4.3

lopollar commented 9 months ago

maybe we should fix this, because the pandas version has killed me already a couple of times

ArneDefauw commented 9 months ago

Fixed by https://github.com/saeyslab/napari-sparrow/pull/161