0% found this document useful (0 votes)
19 views47 pages

Ip Practical File

The document contains details of practical work done on pandas series and dataframes. It includes creating series and dataframes from different sources, accessing and manipulating data in them, and performing mathematical and logical operations. Visualization tasks using Matplotlib include plotting different charts and handling database operations on a student table.

Uploaded by

gahlotkavya09
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views47 pages

Ip Practical File

The document contains details of practical work done on pandas series and dataframes. It includes creating series and dataframes from different sources, accessing and manipulating data in them, and performing mathematical and logical operations. Visualization tasks using Matplotlib include plotting different charts and handling database operations on a student table.

Uploaded by

gahlotkavya09
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 47

Page |1

Nav Bharti Sr Sec School

Name - Kavya gahlot


Class - XII-A
Rollno-

IP PRACTICAL FILE
(065)
For the academic year 2023-24
Signature of teacher signature of external
examiner
Page |2

________________ ______________
INDEX
Sno Particulars

Create a pandas series from a dictionary of


1
values and ndarray

Write a python program to create a pandas


2 series using scalar values
3 Create a pandas series using range function

4 Create a pandas series using NaN values

5 Write a pandas series for mathematical


expression , exponentials and numpy

Create a pandas series to access data from it


6 with position

7 Create a pandas series and use loc[] and iloc[]

Create a pandas series and retrieve the data


8 using some conditions
Page |3

Practicals of pandas (Series)


create a dataframe from dictionary ,
9 dictionary of series and 2darray and also
create a empty dataframe

create a dataframe for employee details and


10 access the elements using head ()& tail()

create a dataframe and update the elements


11 using iteration function program

program to perform following operations like


12 add , select , delete and rename data in rows
and columns of dataframe
Create a a dataframe for accessing data using
13 loc[] and iloc []

Create a dataframe to perform concatenation,


14 merge and join indexing

Create a program for importing and exporting


15 data between pandas and csv
Page |4

Practicals on matplotlib
Write a python program to plot line chart for
1 salary hike of an employee
Write a python program to plot the pass
percentage of the year 2019 2020,classes 6th
2 to 12th using line chart

Write a python program to plot a line chart


using some random value
3
Write a python program to display a
4 histogram graph for blood values based on no
of patients
Given the school result data ,analyse and the
performance of students on different
5 parametres
For the dataframe created above , analyze
6 and plot appropriate chart with title and
legends

Take data of your interest from an open


7 source,aggregate and summarise it then plot
it using different plotting functions matplotlib
Page |5

Practicals on database management


Create a student table with student
id,name,marks as attribute where studentid is
1 primary key
Delete the data of new student in the above
2 table

Delete the data of new student in the above


3 table

Use select command to get the detail sof the


4 students where marks is greater than 80

To select the min,max,avg and sum of marks


5 in student table

Write a sql command to order the


6 (student id, marks) marks in descending order

Write a query to find “ROUND” of percentage


7 in table
(name,marks,percentage)

Write a sql query to display names into


8 capital letters, display first 3,last 3 letters of
Page |6

name, display the position the letter A in


name

to remove the extra spaces from left, right


9 and both sides of “ informaticspractises 12 “

to display todays date in “year/month/date”


10 format

Display dayname, monthname, dayname, day


11 of month,day of year for today's date
Page |7

 Create a pandas series from a dictionary of values


and ndarray

output

 Write a python program to create a pandas series


using scalar values

Output
Page |8

 Create a pandas series using range function

Output

 Create a pandas series using NaN values

Output:

 Write a pandas series for mathematical expression ,


exponentials and numpy
Page |9

Series 1

Series2

 Addition of series
P a g e | 10

 Multiplication of series

 Division of series

 Subtraction of series
P a g e | 11

 Vector operations
Series
P a g e | 12
P a g e | 13

Series object attributes


Series

1.series.index

2.series.values

3. series.size

4.series.hasnans
P a g e | 14

5.series.empty

 Head()

 Tail()
P a g e | 15

 Create a pandas series to access data from it with


position
Series
P a g e | 16
P a g e | 17

 Create a pandas series and use loc[] and iloc[]


Series
P a g e | 18

 Create a pandas series and retrieve the data using


some conditions
series
P a g e | 19
P a g e | 20

 create a dataframe from dictionary , dictionary of


series and 2darray and also create a empty dataframe
 dataframe from dictionary

 dictionary of series

 dataframe from 2d array


P a g e | 21

 empty dataframe
P a g e | 22

 create a dataframe for employee details and access


the elements using head ()& tail()

output

 head()

 tail()
P a g e | 23

 create a dataframe and update the elements using


iteration function program

 iterrows()
P a g e | 24

 program to perform following operations like add ,


select , delete and rename data in rows and columns
of dataframe

 add

 Select
Dataframe.iat[]
P a g e | 25

Dataframe.at[]

 Delete
Del dataframe[label]


Dataframe.drop()
P a g e | 26

Dataframe.pop()

 Renaming coloumn name


P a g e | 27

 Create a a dataframe for accessing data using loc[]


and iloc []
Dataframe

Dataframe.Loc[]

Dataframe.iloc[]
P a g e | 28

 Create a dataframe to perform concatenation, merge


and join indexing

Dataframe

 Concatenation
P a g e | 29

 Merging
P a g e | 30

 Create a program for importing and exporting data


between pandas and csv

Imported file in pandas


P a g e | 31

Section-B(DATA VISUALISATION)
 Write a python program to plot line chart for salary
hike of an employee

Output
P a g e | 32

2. Write a python program to plot the pass


percentage of the year 2019 2020,classes 6th to 12th
using line chart

output
P a g e | 33

3. Write a python program to plot a line chart using


some random value

Output
P a g e | 34

 Write a python program to display a


histogram graph for blood values based on
no of patients

School result data


P a g e | 35

 Given the school result data ,analyse and the


performance of students on different
parametres
P a g e | 36

 For the dataframe created above , analyze


and plot appropriate chart with title and
legends
Dataframe

Stacked bar diagram

Output
P a g e | 37

 Take data of your interest from an open


source,aggregate and summarise it then plot
it using different plotting functions of
matplotlib library

Dataframe

Line chart of following data


Code:
P a g e | 38

Output
P a g e | 39

Database management
 Create a student table with student
id,name,marks as attribute where studentid
is primary key

 Insert the data of new student in the above


table
P a g e | 40

 Delete the data of new student in the above


table

 Use select command to get the detail sof the


students where marks is greater than 80

 To select the min,max,avg and sum of marks


in student table
P a g e | 41

 Write a sql command to order the


(student id, marks) marks in descending
order
P a g e | 42

 Write a query to find “ROUND” of


percentage in table
(name,marks,percentage)

Table

- Round
P a g e | 43

 Write a sql query to display names into


capital letters, display first 3 letters of name,
display last 3 letters of name, display the
position the letter A in name
Table

- Uppercase

- lowercase
P a g e | 44

-to display first three letters of name

-to display last three letters of name

- to display position of the letter A


P a g e | 45

 to remove the extra spaces from left , right


and both sides of “ informaticspractises 12 “

-to remove spaces from left

-to remove spaces from right

-to remove spaces from both sides


P a g e | 46

 to display todays date in “year/month/date”


format

 Display dayname, monthname, dayname,


day of month,day of year for today's date

-dayname

-monthname

-day of month
P a g e | 47

-dayname

-month of year

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy