IP File
IP File
Practical :6. Create a Pandas Series ‘STUDS’ using 10 students’ marks data.
I. Change the indexes of the series object with the student’s name.
II. Print the top 3 scorer students from the series.
III. Print the students name that are score more than 90 % marks.
IV. Sort the values of a series STUD IN descending order of its values and store it into
series object STUD_NEW.
V. Change the value of 2nd row index and 8th row index to 95.
Practical :7. Create a DataFrame ‘S_DATA’ object from a 2D Dictionary having values as lists.
Practical :8. Creating a DataFrame object from a 2D Dictionary having values as dictionary objects.
Practical : 9. Creating a DataFrame object from a list of Dictionary.
Practical :10. Creating a DataFrame object from a list of Lists.
Practical :11. Creating a DataFrame object from a 2-D ndarray.
101 102 103
111 112 113
121 122 123
Practical :12. Creating a DataFrame with Boolean indexes.
Practical :13. Consider the following DataFrame RESULTSHEET:
Here, Names of the students are row labels and term names (UT1, Half Yearly, UT2 and Final) are the
column labels. Write commands for the following questions based on the above DataFrame:
I. Change the row labels from student name to roll numbers from 1 to 6.
II. Change the column labels to Term1, Term2, Term3, Term4.
III. Add a new column Internal Assessment with values ‘A’, ‘A’,’B’,’A’,’C’, ‘B’
IV. Add a new row for the student with name = Asatha and marks equal to 49, 56, 75,58.
V. Delete the first row
VI. Delete the third column
VII. Rename Mansi to Mahak
VIII. Display 2nd row with all columns
IX. Display marks in Half Yearly and Final of all students
X. Display all marks of students from Mansi to Ankita
XI. Display marks of Mansi to Ankita in UT1 and UT2
XII. Display marks of Kanika and Ankita in Half Yearly and Final
XIII. Display first 3 records
XIV. Display last four records
Practical :14. Write a Python Program to plot Line Chart for Salary Hike of an Employee. Display x-axis
label, y-axis label, chart title, legends, change the line colour to red, change width of line to 4 and also
give suitable python statement to save this chart.
Year = [2000,2004,2005,2006,2008,2010,2012,2014,2015,2016,2018,2020]
Salary= [10000,14000,18000,20000,24000,28000,30000,34000,38000,40000,44000,48000]
Practical :15. Write a Python Program to plot the Bar chart for India’s medal tally. Display x-axis label,
y-axis label, chart title, legends, change the bar colour, and also give suitable python statement to
save this chart.
Category = [‘gold’, ’silver’, ’bronze’]
Medal = [10,15,8]