# Recommended equivalent to map / broadcast on GroupedDataFrame

**URL:** <https://discourse.julialang.org/t/recommended-equivalent-to-map-broadcast-on-groupeddataframe/110819>\
**Category:** Data\
**Created:** [February 27, 2024, 5:07am UTC](https://discourse.julialang.org/t/recommended-equivalent-to-map-broadcast-on-groupeddataframe/110819 "2024-02-27T05:07:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rocco\_sprmnt21](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rocco_sprmnt21/32/20127_2.png) [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Post date:** [February 27, 2024, 8:42am UTC](https://discourse.julialang.org/t/recommended-equivalent-to-map-broadcast-on-groupeddataframe/110819/2 "2024-02-27T08:42:36Z")

</div>

If I understood the requirement correctly, you could try the following form

```julia
combine(f1,df1g)

```

if you want to rename the new column, you could use a function like this

```julia
f2(df::AbstractDataFrame) = (;z=sum(df[!, :x1]))

```

---

_[View the full topic](https://discourse.julialang.org/t/recommended-equivalent-to-map-broadcast-on-groupeddataframe/110819)._
