Is there a way to filter Pandas DataFrame rows using wildcard patterns?
Example initial state of the data.
df = pd.DataFrame([
['noun','nominative','singular','m','',''],
['noun','nominative','singular','f','',''],
['noun','nominative','singular','n','',''],
['noun','accusative','singular','n','',''],
['noun','accusative','singular','n','',''],
['noun','accusative','singular','n','',''],
['verb','','singular','','present','1per'],
['verb','','singular','','present','2per'],
['verb','','singular','','present','3per'],
['verb','','plural','','present','1per'],
['verb','','plural','','present','2per'],
['verb','','plural','','present','3per'],
],columns=['pos', 'case', 'number', 'gender', 'tense', 'person'])
mask = pd.Series(['noun','nominative','singular','*','',''])
Objective end state of data:
['noun','nominative','singular','m','',''],
['noun','nominative','singular','f','',''],
['noun','nominative','singular','n','',''],