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

'percentage' step to Python postprocess #87

Open
vdestraitt opened this issue Apr 12, 2019 · 0 comments
Open

'percentage' step to Python postprocess #87

vdestraitt opened this issue Apr 12, 2019 · 0 comments
Labels
py pandas Python pandas backend querytranslate

Comments

@vdestraitt
Copy link
Contributor

Exemple 1: with groups and result in new column

This 'percentage' step config in our VQB "language"...

{
   name: 'percentage'
   new_column: 'new_col'
   column: 'bar'
   group: ['foo']
}

... should yield the following postprocess pipeline:

{
   percentage:
     new_column: 'new_col'
     column: 'bar'
     group_cols: ['foo']
}
{
   formula:
     new_column: 'new_col' # writes result inplace
     formula: "new_col / 100" # We need to divide by 100 to get a result between 0 and 1 while the percentage step returns values between 0 and 100
}

Exemple 2: without groups and result in existing column

This 'percentage' step config in our VQB "language"...

{
   name: 'percentage'
   column: 'bar'
}

... should yield the following postprocess pipeline:

{
   percentage:
     column: 'bar'
}
{
   formula:
     new_column: 'bar' # writes result inplace
     formula: "bar / 100" # We need to divide by 100 to get a result between 0 and 1 while the percentage step returns values between 0 and 100
}
@vdestraitt vdestraitt added py pandas Python pandas backend querytranslate labels Apr 12, 2019
@vdestraitt vdestraitt added this to the v2-uncombed-parrot milestone Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
py pandas Python pandas backend querytranslate
Projects
None yet
Development

No branches or pull requests

1 participant