Index Practical’s of IP
Pr. No. | Practical’s Name / Description | Page. No. |
1. | Write python code to find out the biggest and smallest three items from the given Series. The series Area has been created like:- Area = pd.Series([3659,858,9659,78965,34568, 12456, 6935, 25649, 85214, 9645,3695] | |
2. | Write python code to find out the areas that are more than 50000 km2. The series Area has been created like:- Area = pd.Series([3659,858,9659,78965,34568, 12456, 6935, 25649, 85214, 9645,3695] | |
3. | Write a Python program to create a Series object with 6 random integers and having vowel characters as indexes. | |
4. | Write a program to create a data series and then change the indexes of the Series object in any random order. | |
5. | Create a series object marks, containing marks of 6 students. Write a Python program to sort the values of a Series object marks in ascending order and descending order and store it into Series object ascMarks and descMarks respectively. | |
6. | Write a Python program to create a Dataframe Score containing following data :– Arnab Ramit Samridhi Riya Mallika Preeti Maths 90 92 89 81 94 89 Science 91 81 91 71 95 78 Hindi 97 96 88 67 99 76 | |
7. | Write a Python program to Add one Column and one Row in the DataFrame Score, given in q.no 6. | |
8. | A list stores three dictionaries each storing details (old price, new price, change). Write a Python program to create a DataFrame from it. | |
9. | Write a program to iterate over a DataFrame containing names and marks, which then calculate marks as per the criteria and then adds them to the grade column. Marks >= 80 grade is A, Marks >= 60 grade is B, Marks < 60 grade is C | |
10. | Create a Dataframe Forest dFrameForest State GrossArea DenseForestArea 0 Assam 78438 2797.00 1 Delhi 1483 6.72 2 Kerala 38852 1663.00 Write a Python Program to print only the State and DenseForestArea for all rows. | |
11. | Create a DataFrame ResultDF, contains Arnab Ramit Samridhi Riya Mallika Maths 90 92 89 81 94 Science 91 81 91 71 95 Hindi 97 96 88 67 99 English 95 86 95 80 95 Write a Python Program to (i) delete column ‘Ramit’ and ‘Mallika’ (ii) Delete Rows Hindi, Show the ResultDF. | |
12. | Create a DataFrame ResultDF, contains Arnab Ramit Samridhi Riya Mallika Maths 90 92 89 81 94 Science 91 81 91 71 95 Hindi 97 96 88 67 99 English 95 86 95 80 95 Write a Python code (i) to change the Rows Label ‘Maths’ to ‘Mathematics’ and ‘Science’ to ‘SSc’, and (ii) to change the Column Label ‘Arnab’ to ‘Aman’, and ‘Riya’ to ‘Shreya’. (iii) Print the DataFrame ResultDF | |
13. | Create the following DataFrame Sales containing year wise sales figures for five sales persons in INR. Use the years as column labels, and sales person names as row labels. 2014 2015 2016 2017 Madhu 100.5 12000 20000 50000 Kusum 150.8 18000 50000 60000 Kinshuk 200.9 22000 70000 70000 Ankit 30000 30000 100000 80000 Shruti 40000 45000 125000 90000 Write a Python Program to do the following :- a) Display the row labels of Sales. b) Display the column labels of Sales. c) Display the data types of each column of Sales. d) Display the dimensions, shape, size and value of Sales. e) Display the last two rows of Sales. f) Display the first two columns of Sales. g) Check if Sales DataFrame is empty or it contains data. | |
14. | Write a program to read from a CSV file Employee.csv and create a DataFrame from it, and (i) Print the DataFrame , (ii) Print the first 2 rows , (iii) Print the last 2 records. Employee CSV files contains (Empno, Name, Desgination, Salary) of 6 employees. | |
15. | Write a program to read from a CSV file Employee.csv and create a DataFrame from it but dataframe should not use file’s column header rather should use one column heading EmpId, EmpName, Desg, EmpSal. Also print the maximum salary given to an employee. Employee CSV files contains (Empno, Name, Desgination, Salary) of 6 employees. | |
16. | Write a program to plot a bar chart from the scores of four students in five different subjects. Make sure that bars are separately visible. | |
17. | Write a program to plot a horizontal bar chart from the height of 6 students in your class. | |
18. | Write a program to plot a line chart to display the changing weekly onion prices for four weeks. | |
19. | First 10 terms of a Fibonacci series are stored in a list namely fib = [0,1,1,2,3,5,8,13,21,34] sqre = np.sqrt(fib) Write a program to plot Fibonacci terms and their square root with two separate line. (with different types of markers) | |
20. | Prof. Singh is doing some research in the field of Environment. For some plotting purposes, he has generated some data as: mu = 100 sigma = 15 x = mu + sigma * numpy.random.randn(10000) y = mu + 30 * numpy.random.randn(10000) Write a program to plot this data on a bar-stacked horizontal histogram with both x and y. | |
21. | MySQL Queries | |
Write a SQL command to create a Database named ‘School’. Also write the command to Create a student table with the student id, name, and marks as attributes where the student id is the primary key. Add columns ‘Mobile’ and ‘Sex’ in the table student.Add column ‘Address’ in the table student.Change the name of column ‘Sex’ to ‘Gender’Delete a column ‘Address’ from table Student.Insert the details of 10 new students in the above table. Use the select command to get the details of the students with marks more than 80. Change the mobile number of any one student.Display the details of those students which name start with ‘A’Write output: SELECT LENGTH(NAME), SUBSTR(NAME, 3,3) FROM STUDENT;Write output: SELECT COUNT (DISTINCT GENDER) FROM STUDENT;Display a report like ‘Aditya is scored 20 out of 30” for each student. Where Aditya is the name of student and 20 is the marks of Aditya.Find the min, max, sum, and average of the marks in a student marks table. Display the Gender, Minimum marks and Maximum Marks Gender wise.Find the total number of students from student table gender wise using group by. Write a SQL query to order the (student ID, marks) table in descending order of the marks. Delete the details of a student in the above table. Delete the table Student.Delete the Database School. |
Download Practical Files