Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same variable, different binning, #117

Open
seriksen opened this issue Mar 23, 2020 · 0 comments
Open

Same variable, different binning, #117

seriksen opened this issue Mar 23, 2020 · 0 comments
Assignees

Comments

@seriksen
Copy link
Collaborator

I want to bin the a variable twice, but with different binning in the same dataframe
so in the processing sequence there is

dataframe:
    binning:
        - {in: var1, out: name1, bins: {low: -100000, high: 100000, nbins: 200}}
        - {in: var1, out:  name2, bins: {low: -500, high: 500, nbins: 1000}}

The resulting csv only uses the binning for name2

Current work around is to add a Define stage but this won't scale very well.

make_more_vars:
    variables:
        - var2: {formula: var1}
            
dataframe:
    binning:
        - {in: var1, bins: {low: -100000, high: 100000, nbins: 200}}
        - {in: var2, bins: {low: -500, high: 500, nbins: 1000}}

Could the BinnedDataframe stage be adapted to allow for the first approach to work?

@kreczko kreczko self-assigned this Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants