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
#1
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
Reply


Messages In This Thread
Dropping Rows From A Data Frame Based On A Variable - by JoeDainton123 - Aug-02-2020, 08:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Grouping in pandas/multi-index data frame Aleqsie 3 689 Jan-06-2024, 03:55 PM
Last Post: deanhystad
  Merging rows and adding columns based on matching index pythonnewbie78 3 825 Dec-24-2023, 11:51 AM
Last Post: Pedroski55
  Filtering Data Frame, with another value NewBiee 9 1,414 Aug-21-2023, 10:53 AM
Last Post: NewBiee
  Supervised learning, tree based model - problems splitting data Pixel 0 670 May-16-2023, 05:25 PM
Last Post: Pixel
  Grouping Data based on 30% bracket purnima1 0 959 Feb-16-2023, 07:14 PM
Last Post: purnima1
  Make unique id in vectorized way based on text data column with similarity scoring ill8 0 894 Dec-12-2022, 03:22 AM
Last Post: ill8
  Pandas Dataframe Filtering based on rows mvdlm 0 1,447 Apr-02-2022, 06:39 PM
Last Post: mvdlm
  Exporting data frame to excel dyerlee91 0 1,634 Oct-05-2021, 11:34 AM
Last Post: dyerlee91
  Pandas Data frame column condition check based on length of the value aditi06 1 2,699 Jul-28-2021, 11:08 AM
Last Post: jefsummers
  Adding a new column to a Panda Data Frame rsherry8 2 2,127 Jun-06-2021, 06:49 PM
Last Post: jefsummers

Forum Jump:

User Panel Messages

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