diff --git a/src/nested_dask/utils/utils.py b/src/nested_dask/utils/utils.py index f115cac..e6c250d 100644 --- a/src/nested_dask/utils/utils.py +++ b/src/nested_dask/utils/utils.py @@ -49,6 +49,6 @@ def count_nested(df, nested, by=None, join=True) -> NestedFrame: # and second depending on join if join: # adds the meta onto the existing meta - meta = pd.concat([df.head(0), meta]) + meta = pd.concat([df._meta, meta]) return df.map_partitions(lambda x: npd_utils.count_nested(x, nested, by=by, join=join), meta=meta)