Ip Practical File

Download as pdf or txt
Download as pdf or txt
You are on page 1of 49

(Section-a data handling)

1. Create a pandas series using scalar values.


Code:

Output:

2
2. Create a pandas series using the range function.
Code:

Output:

3
3. Create a pandas series with range and for loop.
Code:

Output:

4
4. Create a pandas series for missing values using the
NaN (not a number) program.
Code:

Output:

5
5. Write a pandas series program to program some of the
object attribute functions.
Code:

Output:

6
6. Create a pandas series using the Head() and Tail()
function program.
Code:

Output:

7
8
7. Create a pandas series to access data from it, with
position (slicing & indexing).
Code:

9
Output:

10
8. Create pandas series to access elements of series
using ‘loc’ and ‘iloc’.
Code:

11
Output:

12
9. Create a panda series & retrieve the data using some
conditions program.
Code:

13
Output:

14
10. Create a Series and print all the elements that are
above the 75th percentile.
Code:

15
Output:

16
11. Create a data frame from the dictionary, dictionary of
series, and 2darry, and also create an empty data frame.
Code:

17
18
Output:

19
12. Create a data frame for employee details and access
the elements using the Head() and Tail() functions.
Code:

20
Output:

21
13. Create a data frame and update the elements using
the iteration function program.
Code:

Output:

22
14. Write a Python program to perform the following
operations Add, Select, Delete, and Rename Data in
Rows & Columns of Data Frame.
Code:

23
Output:

24
25
15. Create a data frame for accessing data using loc & iloc
(indexing using labels).
Code:

26
Output:

27
28
16.Create a program for importing and exporting data
between pandas and CSV files.
Code:

29
Output:

30
17. Create a data frame for examination results and
display row labels, column labels data types of each
column, and the dimensions.
Code:

31
Output:

32
18. Filter out the rows based on different criteria such as
duplicate rows program.
Code:

Output:

33
SECTION-B DATA VISUALISATION

1.Write a Python program to point line chart for the salary


hike of an employee.
Code:

34
Output:

35
2. Write a Python program to plot the percentage of the
year 2019 & 2020, classes 6th to 12th using line chart.
Code:

36
Output:

37
3. Write a Python program to plot line char using some
random value program.
Code:

38
Output:

39
4.Write a Python program to display a histogram graph for
blood sugar values based on No, of patients.
Code:

40
Output:

41
Section-cdatabase management

1.Create a student table with the student I’d, name, and


marks as attributes where the student I’d is the primary
key.

2.Insert the details of a new student in the above


table(Student).

42
3.Delete the details of the student in the above table
(Student).

4.Use the select command to get the details of the student


with marks more than 80 in the above table (Student).

43
5.Find the Min, Max, Sum, and Average of the marks in
the student mark table

6.Write a SQL query to order the (student ID, marks) table


in descending order of the marks.

44
7.Write an SQL query to display the marks without decimal
places, display the reminder after diving marks by 3, and
display the square of marks.

45
8.Find the total number of customers from each country in
the table (customer ID, customer Name, country)using
group by.

46
9.Write an SQL query to display names in capital letters,
and small letters, display the first 3 letters of a name,
display the last 3 letters of a name, and display the
position of the latter A in the name.

10.Display today’s date in “Date/Month/Year” format

47
11.Display day name, month name, day, name, day of the
month, and day of the year for today’s date.

12. Remove extra spaces from left, right and both sides
from the text- “Informatics Practices Class XII”.

48
13. Consider the following MOVIE table and write SQL
query.

• Display the movieid, moviename and total earnings by


showing the business done by the movies. Calculate
the business done by movie using sum of
productioncost and businesscost.

49
14. Display the movie of type action and romance.

15. Display the list of movies which are going to release in


February, 2022.

50

You might also like