Question: PYTHON - PANDAS DATAFRAME QUESTION!! How do I create a new column based on the entries of 2 columns? For example, in the image below

PYTHON - PANDAS DATAFRAME QUESTION!!

How do I create a new column based on the entries of 2 columns? For example, in the image below if Name is Steve and Marks% is 86.29 make a new column that stores "Yes" for this row? And similarly if Name is Matthew and Marks% is 91.63 then the entry would be "No"?

PYTHON - PANDAS DATAFRAME QUESTION!! How do I create a new column

So that the dataframe then looks like:

based on the entries of 2 columns? For example, in the image

Regd. No Name Marks% 1000 Steve 86.29 1001 Mathew 91.63 Regd. No Name Marks% New Column 1000 Steve 86.29 Yes 1001 Mathew 91.63 No

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!