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
Help ASAP
Gelneren [198K]

Answer:

By supplying a variety of charts and graphs to present the information in best way.

By tracking and analyzing the data

By conveying large amount of numerical data in more understandable format.

Explanation:

You need to know the limitations of Excel software. You will find that it does not support more than 3 variables while analyzing. However, if you use analytic software like Tableau and Microsoft Power BI then you can use a lot number of variables. And this is done through graphs and charts, and the other variables apart from x, y, z are the colors, shades. etc. Even color alone can add a good number of variables, and hence you can understand. Thus, you will be able to query better. Queries become better if you have more variables. And charts and graphs always present the information in the best way/ Also you can track and analyze the data. And through it conveying a large amount of numerical data in a more understandable format is made possible, and this is definitely quite helpful. Hence, all of the options mentioned above are helpful. But they do not do complex calculations and complex queries in fact.

4 0
2 years ago
Read 2 more answers
It's possible to __________ out of a loop if the user has entered an incorrect value that would cause an error or a problem with
Stella [2.4K]

Answer:

The answer is Break

<u>Explanation:</u>

When break statement is occurred then, it immediately exits from the loop and executed the statement after the loop without raising any kind of error.

<u>The situation after entering of a value by a user </u>

  • If the user entered incorrect value then it will exit from the loop.
  • If the user entered correct input value, then it will run the loop for the further values.

4 0
2 years ago
You have spent $4,000 on liquor for your bar. Your bar sales have been $24,000. What is your cost of sales for liquor, expressed
amid [387]

Answer:

17%

Explanation:

Given parameters:

Cost price of liquor = $4000

Total sale = $24000

Unknown:

Percentage cost of sale for liquor = ?

Solution:

To find the percentage cost of sale;

       %Cost of sale of liquor = \frac{cost price of liquor}{Total cost of sale }   x 100

Input the variables;

       %Cost of sale of liquor = \frac{4000}{24000}  x 100 = 16.67% = 17%

8 0
2 years ago
Cómo se hacían antes las cosas que hoy en día se hacen apoyadas en aplicaciones y software?
KatRina [158]

Answer:

Las cosas que hoy en día se hacen apoyadas en aplicaciones y el software se hacían de manera manual, artesanal o empírica, es decir, antes del avenimiento de la era digital, las tareas que hoy se han automatizado o informatizado se realizaban de forma analógica, mediante procesos con una participación humana mucho más fuerte.

Así, por ejemplo, en el entrenamiento, la medición de variables por parte de los entrenadores respecto de los atletas era procesada de forma manual: la comparación de las distintas estadísticas era recopilada en formato físico, y analizada en forma personal por profesionales idóneos para tal tarea, mientras que hoy en día esa tarea se ha automatizado y es llevada a cabo por programas informáticos específicos.

A su vez, respecto de la tecnología, por ejemplo, el análisis de las variables de mercado y la subida o bajada de distintos valores era sistemáticamente analizada en forma manual, mientras hoy en día diversos programas permiten realizar un análisis técnico y financiero en forma digital.

6 0
3 years ago
Write the function lettersOnly(s) that takes in a string called s, and returns a string containing only the alphabetic character
Phantasy [73]

Answer:

The program to this question as follows:

Program:

def lettersOnly(s): #defining method lettersOnly

   val="" #defining string variable that return value

   for i in s: #defining loop to calculate value

       if(i.isalpha()): #check condition that value is string

           val=val+ i #add value

   return val #return value

print(lettersOnly("data3base_ro1c3k5s")) #call method and print value

Output:

databaserocks

Explanation:

In the above python code, a method lettersOnly is declared that accepts a string variable  "s" in its parameter. Inside the method, a string variable "val", and loop is declared, in which the "val" variable holds method return value.

  • In the loop and if block is used that uses "isalpha" string method, which checks the check alphabetic character in the given value. if this is true it will calculate all value in "val" variable and return its value.    
  • At the last, the print method is used, which calls the lettersOnly method and prints its return value.
4 0
3 years ago
Other questions:
  • In a database, a collection of related fields that describes some object or activity is referred to as a ____.
    9·1 answer
  • Tim has an old server computer that his company uses as a backup. One of the hard drives has gone bad and needs to be replaced.
    13·1 answer
  • What problem with internal hardware components is similar to unplugged
    6·2 answers
  • True / False<br> The exponent in floating point is stored as a biased value.
    9·1 answer
  • Free 100 point to first to answer
    5·2 answers
  • A Chief Information Security Officer (CISO) needs to establish a KRI for a particular system. The system holds archives of contr
    13·1 answer
  • A(n) ________ moves over the spinning platters to retrieve data from the hard disk.
    6·1 answer
  • A customer has a computer for a home business, but wants to have another computer as a web server. What would be the best soluti
    11·2 answers
  • Which subunit of a heterodimeric cdk is the regulatory subunit?
    6·1 answer
  • What is the complete path and filename of the file where ports and their associated protocols are defined
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!