You are on page 1of 17

CName - ABHAY RAJ PATEL

AClass – XII (SCIENCE)


MSubject –
INFORMATICSPRACTICES
B
Roll No – 01______________

SUBMITTED BY –
ABHAY RAJ PATEL
SUBMITTED TO –
MR. PAWAN SIR

ACKNOWLEDGEMENT
I would like to thank my teacher Mr.
Pawan Sir who gave me this
opportunity to work on this project. I
got to learn a lot from this project
about Python Pandas. I would also
like to thank our school principal
Mrs. Sonia Mishra.
At last, I would like to extend my
heartfelt thanks to my parents
because without their help this
project would not have been
successful. Finally, I would like to
thank my dear friends who have
been with me all the time.
Question1: Write code to create a series
object using the python sequence [4,6,8].
Accept that pandas is imported as alias
name pd.
Solution:

Question2: Write code to create a series


object using an ndarray that is created by
tiling a list [3,4], thrice. Accept that
pandas is imported as alias name pd.
Solution:
Question3: Consider the two series s1
and s2 that you created in previous slides.
Print the attributes of both these objects
in a report form as shown below. Accept
that pandas is imported as alias name pd.
Question4: Consider the series object s4
that stores the number of students in each
section of class 12. For two sections have
been given a task of selling tickets
@100/- per ticket. Write the code to
display how much they have collected.
Accept that pandas is imported as alias
name pd.
Question5: Consider the series object s5
that stores the contribution of each
section, as shown below. Write the code
to modify the amount of section ‘A’ as
7600 and for sections ‘C’ and ‘D’ as
7000. Print the changed object. Accept
that pandas is imported as alias name pd.
Solution:

Question6: Number of students in classes


11 and 12 in three streams (Science,
Commerce and humanities) are stored in
two series objects c11 and c12. Write
code to find total number of students in
class 11 and 12, stream wise. Accept that
pandas is imported as alias name pd.
Solution:
Question7: Write a program to sort the
values of a series object s7 in ascending
order of its values and store it into series
object soln. Accept that pandas is
imported as alias name pd.
Solution:
Question8: Given a series that stores the
area of some states in km^2. Write a
program to find out the biggest and
smallest three areas from given series.
Accept that pandas is imported as alias
name pd. Given the series has been
created like this:
S8=pd.Series([34567, 890, 450, 67892, 34677,
256711, 256518])
Solution:
Question9: Write a program to
create a Data frame from a 2d
list. Specify own index labels.
Accept that pandas is imported
as alias name pd.

Solution:
Question10: Write a program to create a Data
frame from a list containing 2 lists, each
containing target and Actual sales figures of
four zonal offices. Give appropriate row
labels. Accept that pandas is imported as alias
name pd.
Solution:
Question11: Write a program to create a
Data frame to store weight, age and names
of 3 people. Print the Data frame and its
transpose. Accept that pandas is imported
as alias name pd.
Solution:
Question12: Consider the last three odi
scores of Virat Kohli in Bengaluru as
76,54,12, Ahmadabad as 23,54,11 and
Mohali as 42,7,9. Represent this data in
Data frame. Accept that pandas is imported
as alias name pd.
Solution:
Question13: Write a program to create a
Data frame to store total fours, sixes and
wickets in ipl 2022 by Hardik and Krunal
Pandya. Print the Data frame and its assign
index name as ‘IPL INFO’. Accept that
pandas is imported as alias name pd.
Solution:

Question14: Write a program to create a


Data frame to store marks of term 1 of 5
students in English, I.P, Math and Physics.
Print the Data frame. Accept that pandas is
imported as alias name pd.
Solution:
Question15: Object15 Population stores the details of 4 metro cities of
India and Object16 AvgIncome stores the total average income
reported in Previous year in each of these metros. Calculate Per
Capita Income for of these metro cities. Accept that pandas is
imported as alias name pd.
Solution:

END OF FILE.
THANK YOU……

You might also like