Generating group id column in DataFrames?

but this solution does not work

julia> transform!(groupby(df, :city), groupindices => :id)
ERROR: ArgumentError: Unrecognized column selector: DataFrames.groupindices => :id
Stacktrace:
 [1] normalize_selection(idx::DataFrames.Index, sel::Any, renamecols::Bool)
   @ DataFrames ~/.julia/packages/DataFrames/zqFGs/src/abstractdataframe/selection.jl:339
 [2] _combine_prepare_norm(gd::GroupedDataFrame{DataFrame}, cs_vec::Vector{Any}, keepkeys::Bool, ungroup::Bool, copycols::Bool, keeprows::Bool, renamecols::Bool)
   @ DataFrames ~/.julia/packages/DataFrames/zqFGs/src/groupeddataframe/splitapplycombine.jl:68
 [3] _combine_prepare(gd::GroupedDataFrame{DataFrame}, ::Base.RefValue{Any}; keepkeys::Bool, ungroup::Bool, copycols::Bool, keeprows::Bool, renamecols::Bool)
   @ DataFrames ~/.julia/packages/DataFrames/zqFGs/src/groupeddataframe/splitapplycombine.jl:50
 [4] select(::GroupedDataFrame{DataFrame}, ::Union{Regex, AbstractString, Function, Signed, Symbol, Unsigned, Pair, Type, All, Between, Cols, InvertedIndex, AbstractVecOrMat}, ::Vararg{Union{Regex, AbstractString, Function, Signed, Symbol, Unsigned, Pair, Type, All, Between, Cols, InvertedIndex, AbstractVecOrMat}}; copycols::Bool, keepkeys::Bool, ungroup::Bool, renamecols::Bool)
   @ DataFrames ~/.julia/packages/DataFrames/zqFGs/src/groupeddataframe/splitapplycombine.jl:725
 [5] transform!(gd::GroupedDataFrame{DataFrame}, args::Union{Regex, AbstractString, Function, Signed, Symbol, Unsigned, Pair, Type, All, Between, Cols, InvertedIndex, AbstractVecOrMat}; ungroup::Bool, renamecols::Bool)
   @ DataFrames ~/.julia/packages/DataFrames/zqFGs/src/groupeddataframe/splitapplycombine.jl:784
 [6] transform!(gd::GroupedDataFrame{DataFrame}, args::Union{Regex, AbstractString, Function, Signed, Symbol, Unsigned, Pair, Type, All, Between, Cols, InvertedIndex, AbstractVecOrMat})
   @ DataFrames ~/.julia/packages/DataFrames/zqFGs/src/groupeddataframe/splitapplycombine.jl:782
 [7] top-level scope
   @ REPL[313]:1

caused by: MethodError: no method matching getindex(::DataFrames.Index, ::Pair{typeof(groupindices), Symbol})
Closest candidates are:
  getindex(::DataFrames.AbstractIndex, ::InvertedIndex) at ~/.julia/packages/DataFrames/zqFGs/src/other/index.jl:224
  getindex(::DataFrames.AbstractIndex, ::All) at ~/.julia/packages/DataFrames/zqFGs/src/other/index.jl:227
  getindex(::DataFrames.AbstractIndex, ::AbstractRange{Int64}) at ~/.julia/packages/DataFrames/zqFGs/src/other/index.jl:208
  ...
Stacktrace:
 [1] normalize_selection(idx::DataFrames.Index, sel::Any, renamecols::Bool)
   @ DataFrames ~/.julia/packages/DataFrames/zqFGs/src/abstractdataframe/selection.jl:336
 [2] _combine_prepare_norm(gd::GroupedDataFrame{DataFrame}, cs_vec::Vector{Any}, keepkeys::Bool, ungroup::Bool, copycols::Bool, keeprows::Bool, renamecols::Bool)
   @ DataFrames ~/.julia/packages/DataFrames/zqFGs/src/groupeddataframe/splitapplycombine.jl:68
 [3] _combine_prepare(gd::GroupedDataFrame{DataFrame}, ::Base.RefValue{Any}; keepkeys::Bool, ungroup::Bool, copycols::Bool, keeprows::Bool, renamecols::Bool)
   @ DataFrames ~/.julia/packages/DataFrames/zqFGs/src/groupeddataframe/splitapplycombine.jl:50
 [4] select(::GroupedDataFrame{DataFrame}, ::Union{Regex, AbstractString, Function, Signed, Symbol, Unsigned, Pair, Type, All, Between, Cols, InvertedIndex, AbstractVecOrMat}, ::Vararg{Union{Regex, AbstractString, Function, Signed, Symbol, Unsigned, Pair, Type, All, Between, Cols, InvertedIndex, AbstractVecOrMat}}; copycols::Bool, keepkeys::Bool, ungroup::Bool, renamecols::Bool)
   @ DataFrames ~/.julia/packages/DataFrames/zqFGs/src/groupeddataframe/splitapplycombine.jl:725
 [5] transform!(gd::GroupedDataFrame{DataFrame}, args::Union{Regex, AbstractString, Function, Signed, Symbol, Unsigned, Pair, Type, All, Between, Cols, InvertedIndex, AbstractVecOrMat}; ungroup::Bool, renamecols::Bool)
   @ DataFrames ~/.julia/packages/DataFrames/zqFGs/src/groupeddataframe/splitapplycombine.jl:784
 [6] transform!(gd::GroupedDataFrame{DataFrame}, args::Union{Regex, AbstractString, Function, Signed, Symbol, Unsigned, Pair, Type, All, Between, Cols, InvertedIndex, AbstractVecOrMat})
   @ DataFrames ~/.julia/packages/DataFrames/zqFGs/src/groupeddataframe/splitapplycombine.jl:782
 [7] top-level scope
   @ REPL[313]:1