August MT Ip
August MT Ip
3 12
5 State the difference between order by and group by clause with examples 3
6 1
1 | Page
7 Differentiate between array , list and series with respect to display, creation , 3
multiplication
8 Write code in Pandas to create the following DataFrame batsman from a dictionary: 2
Perform the following operations: 5
i) Add both the scores and assign a new column “Total”
ii) Display the highest score in both Score1 and Score2
iii) Display the dataframe
iv) Remove the column Score1
v) Display all the batsman names
B_No Name Score1 Score2
1 Sunil Pillai 90 80
2 Gaurav Sharma 65 45
3 Piyush Goel 70 90
4 Karthik Thakur 80 76
9 Given a list named Pat that has the list of registered patient’s token numbers in some 5
hospital
Pat=[258,547,520,621,125,485,214,457]
Write code in Python to perform the following:
i) Create a series named Ser1 using the list Pat.
ii) Assign Patient as the name of Ser1
iii) Assign index as P1,P2,P3,P4,P5,P6,P7,P8
iv) Given the index name as PAT_ID
v) Display those patients whose token number more than 450
10 Consider the following DataFrame df and answer questions from (i) & (ii)
rollno name MT1 MT2 MT3 MT4
1 Sujith 25 24 20 22
2 Umesh 19 17 19 22
3 Sanjay 20 22 18 24
4 Fathima 22 20 24 20
The teacher needs to know the marks scored by the student with roll number 2. 1
2 | Page