I have a df of invoices, but only the following two columns really matter
OrderNum Id . . . .
586 270
588 270
590 270
590 270
Where OrderNum is int64
and Id is also int64
I am trying to drop duplicates Order Numbers but for whatever reason the following code is deleting all of the rows because duplicates exist
df = df.drop_duplicates(subset = ['OrderNum'], keep = 'last',inplace=False)
Don't know if im using the method incorrectly, but i cant seem to figure out why
Expected result:
OrderNum Id . . .
586 270
588 270
590 270