Holidays Homework - Ip
Holidays Homework - Ip
Q1. Create following Dataframe Hospital from a 2D dictionary having value as lists:
Q2. Create following Dataframe Sales from a 2D dictionary having values as dictionary objects:
Yr1 Yr2
Qtr1 34500 44900
Qtr2 56000 46100
Qtr3 47000 57000
Qtr4 49000 59000
Q3. Create following Dataframe topdf from a 2D list having dictionaries as its elements.
Do following operation
1) Add score1 and score2 and assign it to column total
2) Display lowest score of score1.
3) Display highest score of score2
4) change index to player1,player2, player3,player4
5) Display all the details of DataFrame whose score1 <75
6) Display only name of DataFrame whose score1 <75
7) Display name and score1 of DataFrame whose score1 <75
8) Display DataFrame in descending order of score2
9) Change the column name to batsmanno,bname, s1 ,s2 and sum of DataFrame
10)Add 5 score to those who have more than 75 score2
Note : Solve and write Practical assignment -2 based on the topic DataFrame in the IP practical file.
Holiday Homework-2
CLASS XII – IP
TOPIC: Series and DataFrame
1. Write a program to create a series to print scalar value “5” four times.
2 Write a program to create a series object F1 using a dictionary that stores the number of
furniture in each lab of your school.
Note: Assume four furniture names are Table, Sofa, Chair and stool having 40, 2,45,26 items
respectively and pandas library has been imported as pd.
3. Write a program to create a series object using a dictionary that stores the number of
students in each house of CLASS 12D of your school.
Note: Assume four house names are Beas, Chenab, Ravi and Satluj having 18, 2, 20, 18 students
respectively and pandas library has been imported as pd.