0

I am trying to filter a Dataframe with a few values as below:

df_new = df[[['bill_no']].isin('1002','1005')]

This throws an error

AttributeError: 'list' object has no attribute 'isin'
hello kee
  • 289
  • 2
  • 6
  • 17

1 Answers1

2

You need filter by column df['bill_no'] with values in list ['1002','1005']:

df_new = df[df['bill_no'].isin(['1002','1005'])]
jezrael
  • 822,522
  • 95
  • 1,334
  • 1,252