1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
anzhelika [568]
2 years ago
8

Selecting missing puppies 1 # Select the dogs where Age is greater than 2 2 greater_than_2 = mpr [mpr. Age > 2] 3 print(great

er_than_2) Let's return to our DataFrame of missing puppies, which is loaded as mpr. Let's select a few different rows to learn more about the other missing dogs. 5 # Select the dogs whose Status is equal to Still Missing 6 still_missing = mpr[mpr. Status == 'Still Missing'] 7 print (still_missing) Instructions 100 XP • Select the dogs where Age is greater than 2. 9 # Select all dogs whose Dog Breed is not equal to Poodle 10 not-poodle = mpr [mpr.Dog Breed != 'Poodle'] 11 print(not_poodle) • Select the dogs whose Status is equal to Still Missing. • Select all dogs whose Dog Breed is not equal to Poodle. Run Code Submit Answer * Take Hint (-30 XP) IPython Shell Slides Incorrect Submission Did you correctly define the variable not_poodle ? Expected something different. # Select all dogs whose Dog Breed is not equal to Poodle not_poodle = mpr[mpr.Dog Breed != 'Poodle'] print(not_poodle) File "", line 10 not_poodle = mpr [mpr.Dog Breed != 'Poodle'] Did you find this feedback helpful? ✓ Yes x No SyntaxError: invalid syntax
Computers and Technology
1 answer:
anygoal [31]2 years ago
4 0

Answer:

# the dog dataframe has been loaded as mpr

# select the dogs where Age is greater than 2

greater_than_2 = mpr [mpr. age > 2]

print(greater_than_2)

# select the dogs whose status is equal to 'still missing'

still_missing = mpr[mpr. status == 'Still Missing']

print(still_missing)

# select all dogs whose dog breed is not equal to Poodle

not_poodle = mpr [mpr.breed != 'Poodle']

print(not_poodle)

Explanation:

The pandas dataframe is a tabular data structure that holds data in rows and columns like a spreadsheet. It is used for statistical data analysis and visualization.

The three program statements above use python conditional statements and operators to retrieve rows matching a given value or condition.

You might be interested in
Characteristics of RAM​
lara [203]

Answer:

Short Data lifetime, Less Expensive, Needs to be refreshed often, Smaller in size, etc. tell me if you need more.

7 0
3 years ago
(Drag each tile to the correct box)While surfing online, Patricia first checks her email and reads the latest messages. She then
Marizza181 [45]

Answer:

When Patricia checks her email use:

POP3

TCP

IP

When Patricia brows a website and log in to post a comment use:

HTTP

TCP

IP

LDAP

Explanation:

Email protocol

Patricia starts to check her email, the email application uses the protocol POP3.

The protocol TCP makes a connection with the server and transport the data.

Patricia receives her emails with the protocol IP on her computer.

Website protocol

Patricia started to surf and the protocol HTTP makes a connection with the internet.

The protocol TCP makes a connection with the server and transport the data.

With the protocol IP, she receives the website data.

With the protocol LDAP, Patricia makes a login to post the comment.

6 0
3 years ago
Using truth table, prove that:<br><br> (A + B). C = (A . C)+ (B .C) ?
Genrish500 [490]

Answer:

The image of truth table is attached.

Explanation:

In the truth table there is a separate table for the expression (A+B).C and for the expression (A.C)+(B.C) you can see in the truth table that the columns of (A+B).C is having same values as the (A.C)+(B.C).Hence we can conclude that (A+B).C is equal to (A.C)+(B.C).

4 0
3 years ago
To bundle links together in order to improve bandwidth availability and redundancy, what protocol is used
Daniel [21]

Answer:

Link Aggregation Control Protocol

Explanation:

Link Aggregation Control Protocol can be used to assist in the formation of port channel bundles of physical links.

Link Aggregation Control Protocol is an IEEE standard defined in IEEE 802.3ad. LACP lets devices send Link Aggregation Control Protocol Data Units (LACPDUs) to each other to establish a link aggregation connection.

8 0
3 years ago
Please write a complete program to calculate monthly payment given
jasenka [17]

Explanation:

Code with comments:

#include <stdio.h>

#include <math.h>  

/* math library is required to use pow() function

First we need to create a function to calculate the Monthly Payment

It would take three inputs Rate, Years, and Principle amount

Then we converted the Rate and Months according to problem statement

pow() function is used to find (1+R)^M

Then finaly this function returns the value of Monthly Payment  */

float MonthlyPay(float R, int M, int P)

{

    R=R/1200;

    M=M*12;

   float po=pow((1+R),M);

   float PayM=(R+(R/(po-1)))*P;

    return PayM;

}

/*  In the main() function we get 3 inputs from the user Years, Rate and Principle amount

then we call the MonthlyPay function and pass it 3 inputs that we got from the user

then we calculated the total Payment by multiplying the Monthly Pay and total number of months

then we calculated the interest Amount by subtracting the Principle Amount from total Pay

Testing is performed and output result is given at the end and also attached in the image   */

int main(void)

{

    float Rate;

    int Year, Amount;

    printf("Enter Years: ");

    scanf("%d",&Year);

    printf("Enter Rate: ");

    scanf("%f",&Rate);

    printf("Enter Principle Amount: ");

    scanf("%d",&Amount);

   

    float Pay = MonthlyPay(Rate, Year, Amount);

    printf ("Monthly Payment is: %f \n", Pay);

    float totalPay=Pay*Year*12;

    printf ("Total Payment is: %f \n", totalPay);

    float interest=totalPay-Amount;

    printf ("Interest Expense is: %f \n", interest);

    return 0;

}

Output:

Enter Years: 5

Enter Rate: 7

Enter Principle Amount: 12200

Monthly Payment is: 241.572767

Total Payment is: 14494.367188

Interest Expense is: 2294.367188

7 0
3 years ago
Other questions:
  • Find some search engine as many that you can find
    9·1 answer
  • ​In sql server, the cursor property ____________________ means that the cursor is used for retrieval purposes only.
    9·1 answer
  • At age 16 Cheyanne just got her drivers license
    5·2 answers
  • If you want to open the Navigation pane to do a Find, what should you first click on the Home tab? Paragraph, Editing, Styles, o
    15·1 answer
  • Thank you very much for your email. ...... was very interesting​
    15·1 answer
  • A different way of pronoucing the same words is called a _____
    15·1 answer
  • 1. Write a 400-500 word research report about Burke High School.
    6·1 answer
  • in Python we use IDE ( lntegrated Dvelopment Environment ) to write down the program data points of difference between script mo
    13·1 answer
  • In a _____, there is no skipping or repeating instructions. A. iteration B. sequence C. selection D. conditional
    10·1 answer
  • A machine that converts energy to useful work.
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!