79274049

Date: 2024-12-12 06:34:54
Score: 2
Natty:
Report link

Use df.index.isin to filter index

sub_df = df.loc[df.index.isin([("A", "a1"), ("B", "b2")])]

https://pandas.pydata.org/docs/reference/api/pandas.Index.isin.html

Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: lei zhang