Question
Answer the questions with reference to below data frame:

class order max_speed
falcon bird Falconiformes 389.0
parrot bird Psittaciformes 24.0
lion mammal Carnivora 80.2
monkey mammal Primates NaN
leopard mammal Carnivora 58.0

(i) To print the class wise sum.

(ii) To print the order wise mean

(iii) To sort the index.

(iv) To print the sum of the class wise along with orders columns indexing.

(v) To count the records.

Answer

Get the step-by-step solution for this question inside the Vidyadip app.

Get the answer in the app

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free

Similar questions

WAP to generate n lines of the following pattern on the computer screen: 1
2 2
3 3 3
4 4 4 4
Write the function Bubble() to sort the list using Bubble sort technique. The function will take the list as parameter.
Assuming the given dataset answer the questions given below:

animal age visits priority
a cat 2.5 1 yes
b cat 3.0 3 yes
c snake 0.5 2 No
d dog NaN 3 yes
e dog 5.0 2 No
f cat 2.0 3 No
g snake 4.5 1 No
h cat NaN 1 yes
i dog 7.0 2 No
j dog 3.0 1 No

(a) To create the dataframe from the above dictionary and index is stored in label list.

(b) To display the Data frame.

(c) To calculate the sum of all visits (the total number of visits).

(d) Calculate the mean age for each different animal in df

(e) To Append a new row 'k' to df with your choice of values for each column.

(f) To delete the new entered row.

(g) To count the number of each type of animal in df.

(h) To sort df first by the values in the 'age' in descending order, then by the value in the 'visit' column in ascending order.

(i) To print the maximum values of each column.

(j) To display all the statistics.

(k) To sort the data according the index.

What is Pandas NumPy array?
Trine Tech Corporation (TTC) is a professional consultancy company. The company is planning to set up their new offices in India with its hub at Hyderabad. As a network adviser, you have to understand their requirement and suggest them the best available solutions. Their queries are mentioned (a) to (d) below.

Block to Block distances (in Mtrs.)

FROMToDistance
Human resourceConference110
Human resourceFinance40
ConferenceFinance80

Number of computers in each of the blocks/Center is as follows:

Human resource25
Finance120
Conference90

(a) What will be the most appropriate block, where TTC should plan to install the server?

(b) Draw a block to block cable layout to connect all the buildings in the most appropriate manner for efficient communication.

(c) What will be the best possible connectivity out of the following, you will suggest to connect the new setup of offices in Bangalore with its London based office?

Satellite Link, Infrared, Ethernet cable

(d) Which of the following devices will be suggested by you to connect each computer in each of the buildings.

Switch, modem, Gateway

Write the SQL query questions from (i) to (iv) and write the output of SQL command for questions from (v) to (vii) given below:

Table: EMPLOYEES

EMPID FIRST NAME LAST NAME ADDRESS CITY
010 George Smith 83 First
Street
Howard
105 Mary Jones 842 Vine
Ave.
Losantiville
152 Sam Tones 33 Elm St. Paris
215 Sarah Ackerman 440 U.S. 110 Upton
244 Manila Sengupta 24 Friends
Street
New Delhi
300 Robert Samuel 9 Fifth Cross Washington
335 Henry Williams 12 Moore
Street
Boston
400 Rachel Lee 121 Harrison
St.
New York
441 Peter Thompson 11 Red Road Paris

Table: EMPSALARY

EMPID SALARY BENEFITS DESIGNATION
010 75000 15000 Manager
105 65000 15000 Manager
152 80000 25000 Director
215 75000 12500 Manager
244 50000 12000 Clerk
300 45000 10000 Clerk
355 40000 10000 Clerk
4000 32000 7500 Salesman
441 28000 7500 Salesman

Write the SQL commands for the following :

(i) To show firstname, lastname, address and city of all employees living in paris.

(ii) To display the content of Employees table in ascending order of Firstname.

(iii) To display the firstname,lastname and total salary of all managers from the tables employee and empsalary, where total salary is calculated as salary+benefits.

(iv) To display the maximum salary among managers and clerks from the table Empsalary.

Give the Output of following SQL commands:

(v) Select firstname, salary from employees, empsalary where designation = ‘Salesman ’and Employees.

empid=Empsalary.empid;

(vi) Select count(distinct designation) from empsalary;

(vii) Select designation, sum(salary) from empsalary group by designation having count(*) >2;

Write a function search () to search a record in a binary file according to the student number entered by the user. Also display the message “Record not found” in case record not found in the file.
Write a python program using function to accept a list as parameter and return the sum of all the list elements.
WAP to find the sum of first n terms of the following series:
$1+ x +\frac{x^2}{2}+\frac{x^3}{3}+\ldots$
WAP to find the sum of first n terms of the following series:
$1-\frac{x^3}{3 !}+\frac{x^5}{5 !}-\frac{x^7}{7 !} \ldots$