Practice 1,2
Practice 1,2
I.
A) Write a program in Python Pandas to create the following DataFrame Stationary:
[8]
(Use dict of list method)and perform the following operations on the DataFrame :
B) Mr. Vijay is working in the mobile app development industry and When he
was comparing some playstore APPs based on the ratings, please help him to
visualize that comparison as a barchart.Here are those apps and their
appropriate ratings
"Arogya Setu","WPS Office","Cam
Scanner","WhatsApp","Telegram"
3.9,4.5,4.6,4.2,4.3
II.Consider thegiven table Faculty, write suitable SQL queries for the following: 7
WriteSQLcommandsto:
a.Create the above given table Faculty ,insert the given data
b. Display all records in descending order of Hire_date.
c. Find the maximum and minimum salary.
d. Display the day(ie:Monady ,Tuesday)of Hire date
e. To display details of those faculty members whose First_name ends with‘t’.
f. Find faculty’s average salary for location wise
—-----------------------------------------------------------------------------------------
Practice-2
I. A) Create the following dataframe df and do the given commands:
0 Chenab 5 7 6
1 Ganges 10 5 4
2 Jamuna 12 13 15
3 Jhelum 8 9 12
4 Ravi 5 11 10
5 Satluj 10 5 3
i.Display the house names where the number of Second Prizes are in the range of
12 to 20
ii. Display all the records in the reverse order.
iii. Display the bottom 3 records.
iv. Create the another row with this values(‘Tedd’,2,5,12)
B) ‘Techknow’ institute wants to represent the students attendance for the month
january to june in line chart,those months respective attendance are
30,50,50,30,30,60. Save the output as pdf and add title ,labels for the graph:
II.
[7]
i. Create the above table and insert the following data
ii. Count the total number of employees working in each department.
iii. Display all the details of the employees in the descending order of their
salaries.
iv. Find the position of character ‘r’ in designation
v. Increase the salary 20% for programmers
vi. Display the name and designation of employees whose name ends with
‘Kumar’
—---------------------------------------------------------------------------------------------------
Practice-3
I. Mr. Karambir is working as Examinor In-Charge in school, and he has provided some
data. On which he wants to do some operations, but he is facing some problem, help
him:
Roll Name marks
0 1 a 87
1 2 b 45
2 3 c 67
3 4 d 39
4 5 e 78
i)Display all records having rollno more than 3
ii)Add a new column ‘Grade’, with the values, ‘ A’, ‘B’, ‘A’, ‘B’, ‘A’ to the DataFrame
iii)Write a code to display the following output:
Name marks
0 a 87
1 b 45
iv)Delete the column “Name”
B) Write code to plot a line chart to depict the run rate of T20 match from given data:
Overs Runs
5 45
10 79
15 145
20 234
II.Consider thegiven table Faculty, write suitable SQL queries for the following:
[7]
WriteSQLcommandsto:
a.Create the above given table Faculty ,insert the given data
b. Display all records in descending order of salary.
c. Find the number of unique locations
d. Display the first 3 characters of firstname column
e. Change the salary as 30000 who joined before 2000
f. Find faculty’s average salary for location wise
—---------------------------------—------------------------------------------------------------------------------
Practice-4
A)
(i) To display the ‘Names’ and ‘Marks’ columns from the DataFrame.
(ii) to change the ‘Marks’ in the 4th row (i.e. for index 3) to 91.5
(iii) to display the rows where number of ‘Trials’ in the examination is less than 2 and ‘Marks’ is
greater than 95
B) The table below shows the Marks of two students for the four unit tests for academic session
2019-2020. Plot the given data as line graph add legends and labels
(i) To display names of stores along with Sales Amount of those stores that are
located in Mumbai.
(iii) To display the City and the number of storeslocated in that City, only if
number of stores is more than 2.
Find output: