Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Here is my dataframe ID Tell Number 0 1 Yes 2 1 1 Yes 6 2 1 No 9 3 2 Yes 4 4 2

Here is my dataframe

 ID Tell Number 0 1 Yes 2 1 1 Yes 6 2 1 No 9 3 2 Yes 4 4 2 Ye 7 5 2 No 8 6 3 Ye 15 7 3 Yes 2 8 3 No 6 9 3 Yes 2 # Creating the dictionary dic = {'ID': [1,1,1,2,2,2,3,3,3,3], 'Tell': ['Yes', 'Yes', 'No', 'Yes','Ye', 'No','Ye', 'Yes','No', 'Yes'], 'Number': [3,6,9,4,7,8,15,8,6,13]} # Creating the dataframe df = pd.DataFrame(dic) 

I want my program to be able to remove every row from my dataframe if the number is higher then 6 and the Tell column is either Ye or Yes.

I want it to look like that:

 ID Tell Number 0 1 Yes 2 1 1 Yes 6 2 1 No 9 3 2 Yes 4 4 2 No 8 5 3 Yes 2 6 3 No 6 7 3 Yes 2 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions

Question

How can we value the interests of future generations?

Answered: 1 week ago