| Amit | Ram | Sam | Roja | Monan | |
| Maths | 90 | 92 | 89 | 81 | 94 |
| Science | 91 | 81 | 91 | 71 | 95 |
| Hindi | 97 | 96 | 88 | 67 | 99 |
(a) He wants to add a new column with name of student ‘Prem’ in above data frame choose the right command to do so:
(b) He wants to set all the values to zero in data frame, choose the right command to do so:
| Amit | Ram | Sam | Roja | Monan | Prem | |
| Maths | 0 | 0 | 0 | 0 | 0 | 0 |
| Science | 0 | 0 | 0 | 0 | 0 | 0 |
| Hindi | 0 | 0 | 0 | 0 | 0 | 0 |
(i) DF=0 (ii) DF[]=0
(iii) DF[:]=0 (iv) DF[:]==0
(c) He want to delete the row of Science marks:
(i) DF.drop(‘Science’, axis=1)
(ii) Dfdrop(‘Science’, axis=0)
(iii) dfdrop(‘Science’, axis=-1)
(iv) dfdrop(‘Science’, axis==0)
(d) What will be the output of the given command?
DFindex=[‘A’,’B’,’C’]
(iv) Error, Index already exist cannot be overwrite
| Amit | Ram | Sam | Roja | Manan | |
| A | 90 | 92 | 89 | 81 | 94 |
| B | 91 | 81 | 91 | 71 | 95 |
| C | 97 | 96 | 88 | 67 | 99 |
(e) The given code is to create another data frame, which he want to add to existing Data Frame choose the right command to do so:
Sheet1={
‘Aaradhya’: pdSeries([90, 91, 97],
index=[‘Maths’,’Science’,’Hindi’])}
S1=pdDataFrame(Sheet1)
(i) Df.append(S1,axis=0)
(ii) Df.append(S1)
(iii) Df.insert(S1)
(iv) Df.join(S1)
(b) (iii) DF[:]=0
(c) (ii) DFdrop(‘Science’, axis=0)
(d) (ii)
(e) Df.append(S1)
