diff --git a/src/nested_dask/core.py b/src/nested_dask/core.py index c15ff46..a1221fd 100644 --- a/src/nested_dask/core.py +++ b/src/nested_dask/core.py @@ -663,7 +663,8 @@ def reduce(self, func, *args, meta=None, **kwargs) -> NestedFrame: # Handle meta shorthands to produce nestedframe output # route standard dict meta to nestedframe if isinstance(meta, dict): - meta = npd.NestedFrame(meta, index=[]) + series_dict = {item[0]: pd.Series(dtype=item[1]) for item in meta.items()} + meta = npd.NestedFrame(series_dict) # reroute series meta to nestedframe, per consistency with nested-pandas elif isinstance(meta, tuple) and len(meta) == 2: # len 2 to only try on proper series meta meta = npd.NestedFrame(pd.Series(name=meta[0], dtype=meta[1]).to_frame())