Computer Science, asked by bhavikarathod261, 5 months ago

WARISTO
22
Consider the following DataFrame emp and answer any four questions
from (0)- (V)
empno Name
Dept
salary Experience
(in Years)
1
Ram Singh
IT
15000
2.5
2
Shyam Singh HR
18000
3
3
Nidhi Gupta
IT
9000
2
4
Puja Sharma EXE
24000
8
5
Rohan Malik HR
20000
6
Write down the command that will give the following output.
Empno 5
Name
Rohan Malik
Dept
HR
Salary 20000
Experience 6
dtype: object
()
a. print(emp.max)
b. print(emp.max()).
c. print(emp.max(axis=1))
d. print(emp.max,axis=1)
The CEO needs to know the salary of the employee with empno 4. Help him
to identify the correct set of statement/s from the given options:
a. emp1=emp[emp['empno']==4]
print(emp1)
b. emp1=emp[emp]
print(emp1)
c. emp1=emp[emp.empno=4]
print(emp1)
d. emp1=emp[emp.empno==4]
print(emp1)
Which of the following statement/s will give the exact number of values in
each column of the dataframe?
1. print(emp.count())
ii. print(emp.count(0))
iii. print(emp.count)
iv. print(emp.count(axis='index'))
Choose the correct option:
a. both () and(10)
b. only)
C. (i), (ii) and(iii)
d. 0. () and(iv)
Which of the following command will display the column labels of the
DataFrame?
(iv)
a. print(emp.columns())
b. print(emp.column()
C. print(emp.column).
d. print(emp.columns)
Page 3 of 9
(V)
Mr. Satvik Ahuja, the CEO wants to add new column, the rating of the
performance of employees with the values, 'A', 'A', 'B', 'A', 'B', to the
DataFrame. Help him choose the command to do so:
a. emp.column=[A','A','B','A','B']
b. emp['Performance'l=['A','A','B','A','B']
c. emp.loc['Performance')= ['A','A','B','A','B']
d. Both (b) and (c) are correct
non haimaan​

Answers

Answered by bisariaharshita03
0

Answer:

1

2

3

4

5

because print emo count axis-q mcolumns

Similar questions