Python Forum

Full Version: Dropping Rows From A Data Frame Based On A Variable
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all

I have a data frame which i want rows to be removed.

I am using the command:-

data_frame_current.drop(index=b)
b is a variable that increments which represents the row.

So i want to remove the row that has the index b.

But this does not work, but has not errors.

Can anyone point me in the right direction please?

Thank you
What behavior did you expect? May be you forgot to set inplace=True? data_frame_current.drop(index=b, inplace=True).