0% found this document useful (0 votes)
67 views9 pages

Informatics Practices

This document contains Python programs to perform operations on Pandas Series. It includes programs to create Series from lists and dictionaries, perform arithmetic operations on Series, retrieve values from Series based on conditions, and more. The programs demonstrate basic Series creation and manipulation.

Uploaded by

subash murugaiya
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)
67 views9 pages

Informatics Practices

This document contains Python programs to perform operations on Pandas Series. It includes programs to create Series from lists and dictionaries, perform arithmetic operations on Series, retrieve values from Series based on conditions, and more. The programs demonstrate basic Series creation and manipulation.

Uploaded by

subash murugaiya
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/ 9

PRACTICAL

PYTHON
PROGRAMS

By Ishwariyah Subash
CLASS: XII-C

1|Page
PRACTICAL – 1
PANDAS SERIES

DATA SERIES-PROGRAM- 1
1.a) Write a program in python to perform the following operations:
-To create a Series from a list with values ONE,TWO.THREE,FOUR,FIX,SIX.
-To print the Series with default index values
-To print the Series and give it the index values of ‘a’ ,’b’ ,’c ’,’d’ ,’e’ ,’f’

Program

OR

OUTPUT:
2|Page
3|Page
1.b) Write a Python Program to create a pandas series from a
dictionary of values given below:
D1= {‘a’;100, ‘b’:200, ‘c’:300, ‘d’:400, ‘c’:500}

PROGRAM

OUTPUT:

4|Page
PRACTICAL-2
PANDAS SERIES

DATA SERIES -PROGRAMS-2


2.Write a program to perform basic arithmetical operations of addition,
subtraction, multiplication, division and integer division on two series S1 and
S2 with values S1= [10,20,30,40,50] & S2= [2,4,6,8,10].

OUTPUT:
PROGRAM

5|Page
PRACTICAL – 3
PANDAS SERIES

DATA SERIES PROGRAM-3


3.Write a program in Python to perform the following operations:
a) To create a Series from an array A of values [10 20 30 40 50 60 70 80 90 100]
without range function with index values A,B,C,D,E,F,G,H,I,J.
PROGRAM

OUTPUT:

6|Page
b)To create a Series from an array A of values [10 20 30 40 50 60 70 80 90 100]
with range function with default index values.

PROGRAM

OUTPUT:

7|Page
PRACTICAL – 4
PANDAS SERIES

DATA SERIES-PROGRAMS – 4
4. Write a program in python to retrieve MARKS in a series S1 based on the
conditions given below:
The List of MARKS are [45.5,67.75, 89.5, 33.25, 90.75, 70.0 ,29.25 ,95.5]
a) Display all the marks with values less than or equal to 40.
b) Display all marks with values greater than or equal to 90.
c) Display all marks not less than 60.
d) Display all marks not above 40.
e) Display all the marks other than 70.

PROGRAM

8|Page
OUTPUT:

9|Page

You might also like