Python Forum
Dropping Rows From A Data Frame Based On A Variable
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dropping Rows From A Data Frame Based On A Variable
Hi all

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

I am using the command:-

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).

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to filter data frame dynamically with the columns psahay 0 168 Aug-24-2020, 01:10 PM
Last Post: psahay
  Extracting rows based on condition on one column Robotguy 2 197 Aug-07-2020, 02:27 AM
Last Post: Robotguy
  How to shift data frame rows of specified column Mekala 0 435 Jul-21-2020, 02:42 PM
Last Post: Mekala
  Filter data based on a value from another dataframe column and create a file using lo pawanmtm 1 291 Jul-15-2020, 06:20 PM
Last Post: pawanmtm
  HELP- DATA FRAME INTO TIME SERIES- BASIC bntayfur 0 235 Jul-11-2020, 09:04 PM
Last Post: bntayfur
  Pandas data frame creation from Kafka Topic vboppa 0 208 Jul-01-2020, 04:23 PM
Last Post: vboppa
  Filter rows by multiple text conditions in another data frame i.e contains strings an Pan 0 459 Jun-09-2020, 06:05 AM
Last Post: Pan
  How can I convert time-series data in rows into column srvmig 0 337 Apr-11-2020, 05:40 AM
Last Post: srvmig
  Displaying Result from Data Frame from Function eagle 1 440 Apr-08-2020, 11:58 PM
Last Post: eagle
  add formatted column to pandas data frame alkaline3 0 344 Mar-22-2020, 06:44 PM
Last Post: alkaline3

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020