Skip to content

Commit

Permalink
Update a docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
olejandro committed Dec 23, 2024
1 parent 81facc1 commit 236b41a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions xl2times/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2136,10 +2136,7 @@ def process_transform_availability(


def filter_by_pattern(df: pd.DataFrame, pattern: str) -> pd.DataFrame:
"""
Filter dataframe index by a regex pattern. Parameter combined indicates whether commas should
be treated as a pattern separator or belong to the pattern.
"""
"""Filter dataframe index by a regex pattern."""
# Duplicates can be created when a process has multiple commodities that match the pattern
df = df.filter(regex=utils.create_regexp(pattern), axis="index").drop_duplicates()
exclude = df.filter(regex=utils.create_negative_regexp(pattern), axis="index").index
Expand Down

0 comments on commit 236b41a

Please sign in to comment.