pymrio.index_fullmatch

pymrio.index_fullmatch(df_ix, find_all=None, **kwargs)

Fullmatch regex on index of df_ix.

Similar to pandas str.fullmatch, thus the whole string of the index must match.

The index levels need to be named (df.index.name needs to be set for all levels).

Note:

Arguments are set to case=True, flags=0, na=False, regex=True. For case insensitive matching, use (?i) at the beginning of the pattern.

See the pandas/python.re documentation for more details.

param df_ix

Method works on Index directly or extract from DataFrame/Series

type df_ix

pd.DataFrame, pd.Series, pd.Index or pd.MultiIndex

param find_all

If str (regex pattern) search for all matches in all index levels. All matching rows are returned. The remaining kwargs are ignored.

type find_all

None or str

param kwargs

The regex to match. The keys are the index names, the values are the regex to match. If the entry is not in index name, it is ignored silently.

type kwargs

dict

returns

The matched rows/index, same type as _dfs_idx

rtype

pd.DataFrame, pd.Series, pd.Index or pd.MultiIndex