Professional Documents
Culture Documents
Informatics Practices
Informatics Practices
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
OUTPUT:
PROGRAM
5|Page
PRACTICAL – 3
PANDAS SERIES
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