JuliaData / JuliaData/DataFramesMeta.jl

Way to use `renamecols = false` from DataFrames.jl?

Open
#428 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
496
Forks
56
PR merge metrics
No merged PRs in 30d

Description

I would like to be able to use the renamecols=false keyword argument from base DataFrames to avoid writing these long column names twice.

    @rtransform! df begin
        $"Type/Grade" = string($"Type/Grade")
        $"Class/Condition/Temper" = string($"Class/Condition/Temper")
    end

I got ERROR: LoadError: ArgumentError: Malformed expression in DataFramesMeta.jl macro when I tried without the lefthand sides.
(You could maybe even assume the user wants to update in place when no LHS are present?)

@rtransform! df begin
    string($"Type/Grade")
    string($"Class/Condition/Temper")
    @kwarg renamecols = false
end

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the @rtransform! macro entry point and compare its keyword handling with DataFrames.jl's renamecols behavior. Trace how expressions without left-hand sides are parsed and determine the intended in-place semantics; done means the shown renamecols=false-style usage is accepted without malformed-expression errors and is covered by the project's relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.