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

More rigorous value cols regex #55

Merged
merged 2 commits into from Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion fast_plotter/postproc/__main__.py
Expand Up @@ -19,7 +19,7 @@ def make_parser():
help="A yaml to configure the post-processing step")
parser.add_argument("-o", "--outdir", default=".",
help="The name of the output directory")
parser.add_argument("-V", "--value-cols", default=r"(.*sumw2?|n)",
parser.add_argument("-V", "--value-cols", default=r"(.*sumw2?|/^n$/)",
DBAnthony marked this conversation as resolved.
Show resolved Hide resolved
help="A regular expression to control which columns are"
" identified as values and not bin labels")
parser.add_argument("files", nargs="+",
Expand Down
2 changes: 1 addition & 1 deletion fast_plotter/postproc/functions.py
Expand Up @@ -446,7 +446,7 @@ def normalise_group(df, groupby_dimensions, apply_if=None, use_column=None):
return normed


def open_many(file_list, value_columns=r"(.*sumw2?|n)", return_meta=True):
def open_many(file_list, value_columns=r"(.*sumw2?|^n$)", return_meta=True):
""" Open a list of dataframe files
"""
dfs = []
Expand Down