The document provides a list of 15 practical exercises for students to complete related to Informatics Practices for Class XII. The practicals cover topics like creating and manipulating series and dataframes in Python, performing calculations and grouping on data, plotting various charts from data, importing/exporting CSV files, and analyzing and visualizing data.
The document provides a list of 15 practical exercises for students to complete related to Informatics Practices for Class XII. The practicals cover topics like creating and manipulating series and dataframes in Python, performing calculations and grouping on data, plotting various charts from data, importing/exporting CSV files, and analyzing and visualizing data.
1. Create a series from a dictionary of values and a ndarray.
2. Given a Series, print all the elements that are above the 75th percentile. 3. Section(sect) A,B,C,D,E and contribution(contri) made is respectively (6700,5600,5000, 5200,nil) for a charity. Write code to create a series that stores the contribution amount as the values and section names as the indexes with datatype as float32. The contribution of each section will be doubled when the series is printed. 4. Create a series that stores the area of some states (15 values) in km2. Write a code to find out the biggest and the smallest three areas from the series. 5. Create a series of ages below hundred and find out the ages that are more than 50. 6. Create a Data Frame quarterly sales where each row contains the item category, item name and expenditure. Group the rows by the category and print the total expenditure per category. 7. Consider an array with values 10,20,30,40,50. Create a series from this array with default indexes and write python statements for the following. a. Set the values of all elements to 100 b. Create a new series with index values from ‘A’ to ‘E’. c. Add 10 to all elements of the series and display it. d. Display 1st and 4th elements of the series. e. Set the value of 3rd element to 500. 8. Create a dataframe for examination result and display row labels, column labels data types of each column and the dimensions.
9. Write a program to draw line chart for the following:
Show the unemployment rate from 1920 to 2010 Year = [1920,1930,1940,1950,1960,1970,1980,1990,2000,2010] Unemployment_Rate = [9.8, 12, 8, 7.2, 6.9, 7, 6.5, 6.2, 5.5, 6.3] 10.Write a program to plot a bar chart for the following and apply attributes and labels: objects=["Python", "C++", "Perl", "Java", "VB"] performance = [10,8,6,3,1] 11.Create an array having 30 elements between 5 and 50. Plot a histogram having 10 bins. 12.Create a dataframe with RollNo, Name, Age and Marks of 5 students with default index. Write the commands to do the following operations on the dataframes. a. Calculate the total marks and display in the fileld ‘Total’ b. Change the index from default to RollNo. c. Apply iteration to read all rows and columns. d. Add a new row to the dataframe. e. Delete 3rd record from the dataframe. 13.Create a dataframe as follows and write the commands to do the following operations.
a. Display the details of students whose percentage is greater than 80.
b. Display the details of students who are either in Science or Commerce stream. c. Display the details of students who are in Math stream and percentage greater than 80 d. Increase the percentage of Math stream students by 2 e. Delete the columns ‘Age’ & ‘Stream’. 14.Importing and exporting data between pandas and CSV file. 15. Create a dataframe with Name and Total marks scored by 5 students. Analyze, and plot appropriate charts with title and legend. ************