0% found this document useful (0 votes)
36 views2 pages

Class 12 IP Practical File 2025-26

The document outlines practical file questions for 12th-grade Informatics Practices for the academic year 2025-26. It includes tasks related to creating and manipulating pandas series and data frames, data visualization using charts, and SQL operations on student and customer data. The questions cover a range of topics from data analysis to database management.

Uploaded by

Preeti Saini
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views2 pages

Class 12 IP Practical File 2025-26

The document outlines practical file questions for 12th-grade Informatics Practices for the academic year 2025-26. It includes tasks related to creating and manipulating pandas series and data frames, data visualization using charts, and SQL operations on student and customer data. The questions cover a range of topics from data analysis to database management.

Uploaded by

Preeti Saini
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Practical File Questions

12th Informatics Practices


2025-26

1. Create a panda’s series from a dictionary of values and a Nd array


2. Create a series using list.
3. Creating a series: Empty, Scaler and Numpy array
4. Create 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.
5. Create a data frame for examination result and display row labels, column labels
data types of each column and the dimensions
6. Filter out rows based on different criteria such as duplicate rows.
7. Importing and exporting data between pandas and CSV file.
8. Write a program to iterate over a DataFrame containing names and marks, then
calculate grades as per marks and add them to the grade column.
9. Given the school result data and analysis the performance of the student on
different parameter such as subjectwise or classwise.
10. Create DataFrame for analysis and plot chart with title and legends.
11. Write a Python program to plot a simple line chart showing the growth of a plant
over 5 days.
12. Create a bar chart showing the marks obtained by a student in 5 subjects.
13. Plot a horizontal bar chart showing the number of students in different streams.
14. Draw a pie chart showing the percentage of time spent by a student on various
activities in a day.
15. Write a Python script to display bar chart for population of five cities using
custom colors.
16. Display a pie chart showing favourite fruits of students with explode and shadow
effects.
17. Program to concatenating two 2D array using single array.
18. WAP to Sort the data in dataframe.
19. To write in csv file ‘[Link]’ and also display the content of the file.
20. Binary operations on dataframes.
21. Create a student table with the student id, name, and marks as attributes where the
student id is the primary key.
22. Insert the details of a new student in the above table.
23. Delete the details of a student in the above table.
24. Use the select command to get the details of the students with marks more than 80.
25. Find the min, max, sum, and average of the marks in a student marks table.
26. Find the total number of customers from each country in the table (customer ID,
customer Name, country) using group by.
[Link] a SQL query to order the (student ID, marks) table in descending order of
the marks.
[Link] SQL query to display all the records of the student table.
29. String functions
30. Date and Time functions.

Common questions

Powered by AI

To export a Pandas DataFrame to a CSV file, you use the `to_csv()` method, specifying the file path as a parameter. Considerations include ensuring the correct delimiter is used for your data needs (comma by default), handling indices (which can be included or excluded), and encoding, especially if dealing with non-ASCII data. Choosing appropriate filenames and directories is also important for file organization and accessibility.

To create a Pandas Series using a list, you simply pass the list to the `pd.Series` constructor. This can be useful for tasks such as data preprocessing where you might need to convert a list of data points into a Series to take advantage of Pandas' robust data manipulation capabilities. This allows for operations like filtering, aggregation, and more.

To calculate grades based on marks and add these as a new column, you can use a function to determine the grade from the marks, then apply this function to the DataFrame. A simple example is using Pandas' `apply()` method along with a custom function: `df['grade'] = df['marks'].apply(lambda x: 'A' if x >= 80 else ('B' if x >= 60 else 'C'))`. This code evaluates each row of the 'marks' column and assigns a grade based on predetermined thresholds.

To insert a new student record into a student table, you use the `INSERT INTO` SQL statement. For example: `INSERT INTO students (student_id, name, marks) VALUES ('S004', 'John Doe', 85);`. This query adds a new row to the students table with the specified ID, name, and marks. Such operations are fundamental for updating the dataset with new information.

To construct a pie chart with exploding and shadow effects, you utilize the `matplotlib.pyplot.pie()` method. For example, given a dataset, you can call `plt.pie([20, 30, 50], explode=(0.1, 0, 0.1), shadow=True, labels=['Apple', 'Banana', 'Cherry'])`. This pie chart highlights sections with exploded slices and adds a shadow for a 3D appearance, enhancing the chart’s visual appeal and clarity.

Line charts are typically used to display data trends over intervals or time, often useful in showing growth or change, such as tracking the growth of a plant over time. Bar charts are useful for comparing different groups or categories, for instance, showing marks obtained by a student in multiple subjects. Choosing the correct chart type is crucial for effectively communicating the data insights to the audience.

To handle duplicate rows in a DataFrame, you can use the `drop_duplicates()` method to remove them or the `duplicated()` method to identify them first. For example, `df.drop_duplicates()` removes all duplicate rows based on all columns. Optionally, you can specify the `subset` parameter to consider duplicates only in certain columns. Handling duplicates is crucial for ensuring data integrity and avoiding skewed analysis results.

Concatenating two 2D arrays involves using functions such as `numpy.concatenate()` where you specify the arrays and the axis along which to concatenate. For example, `np.concatenate((array1, array2), axis=0)` will join the arrays along rows. Potential challenges include ensuring compatible shapes along the concatenation axis and managing memory efficiently for large arrays. Such operations are essential for data integration and complex data manipulations.

To group data in a Pandas DataFrame and perform an aggregation, you use the `groupby()` method followed by an aggregation function like `sum()`. For instance, to sum expenditures by category, you would call `df.groupby('category')['expenditure'].sum()`, where 'category' is the column to group by and 'expenditure' is the column to aggregate. This technique is particularly useful for summarizing data and gaining insights into different segments.

To retrieve records of students who scored above 80 marks, you employ the `SELECT` statement with a `WHERE` clause in SQL, such as: `SELECT * FROM students WHERE marks > 80;`. This command filters students whose marks exceed 80, allowing for targeted analysis or reporting on high-performing students.

You might also like