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

Add as_run parameter to ScmRun.process_over #160

Closed
lewisjared opened this issue Jun 24, 2021 · 1 comment · Fixed by #176
Closed

Add as_run parameter to ScmRun.process_over #160

lewisjared opened this issue Jun 24, 2021 · 1 comment · Fixed by #176
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@lewisjared
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

The resulting output from process_over can often be cast to a ScmRun. A nice quality of life improvement would be performing this operation without an explicitly cast.

I would also recommend adding an op_cols parameter a la the ops functions. This would simplify when a required column such as variable is used.

This should allow the following:

df = run.process_over("variable", operation="sum")
df["variable"] = "Emissions|GHG"
run = scmdata.ScmRun(
  df
)

to be replaced with :

run = run.process_over("variable", operation="sum", ops_cols={"variable": "Emissions|GHG"}, as_run=True)
@lewisjared lewisjared added enhancement New feature or request good first issue Good for newcomers labels Jun 24, 2021
@znicholls
Copy link
Collaborator

as_run could allow metadata to be maintained too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants