| 1286 | |
| 1287 | |
| 1288 | def _meta_apply_transform(obj, grp_func): |
| 1289 | kwargs = obj.operand("kwargs") |
| 1290 | by_meta = obj._by_meta |
| 1291 | by_meta = [x if is_scalar(x) else meta_nonempty(x) for x in by_meta] |
| 1292 | meta_args, meta_kwargs = _extract_meta((obj.operand("args"), kwargs), nonempty=True) |
| 1293 | return make_meta( |
| 1294 | grp_func( |
| 1295 | meta_nonempty(obj.frame._meta), |
| 1296 | by_meta, |
| 1297 | key=obj._slice, |
| 1298 | args=meta_args, |
| 1299 | **_as_dict("observed", obj.observed), |
| 1300 | **_as_dict("dropna", obj.dropna), |
| 1301 | **_as_dict("group_keys", obj.group_keys), |
| 1302 | **meta_kwargs, |
| 1303 | ) |
| 1304 | ) |
| 1305 | |
| 1306 | |
| 1307 | def groupby_projection(expr, parent, dependents): |