DEV Community

Nilotpal Choudhury
Nilotpal Choudhury

Posted on

1

Answer: How to drop a list of rows from Pandas dataframe?

I solved this in a simpler way - just in 2 steps.

Step 1: First form a dataframe with unwanted rows/data.

Step 2: Use the index of this unwanted dataframe to drop the rows from the original dataframe.

Example:

Suppose you have a dataframe df which as many columns including…

Top comments (0)

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay