0% found this document useful (0 votes)
33 views29 pages

IP 12th Practical File

Uploaded by

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

IP 12th Practical File

Uploaded by

kuwarkalra.10
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Python

Programs
Q1. Create a dataframe named as students using a list
of names of 5 students.

Output :
Q2. Write a Pandas program to select the rows where
the percentage greater than 70

Output :
Q3. Write a Pandas program to join the two given
dataframes along rows and assign all data.

Output :
Q4. Program to select or filter rows from a DataFrame based on values in
columns in pandas. ( Use of Relational and Logical Operators)

Output :
Q5. Replace all negative values in a data frame with a 0.

Output :
Q6. Write a Pandas program to perform
arithmetic operations on two Pandas Series.

Output :
Q7. Generate a series and print the first and last 3
elements using the head & tail function.

Output :
Q8. Generate a series of 10 numbers. Change the value
of all the elements those values are multiples of 4

Output :
Q9. Write a Pandas program to add some data to
an existing Series.

Output :
Q10. Generate a series of 10 numbers starting with 41 and
with the increment of 3. Now add 7 all odd values and
subtract 3 in even values. Reprint the updated series.

Output :
Q11. Create a dataframe countries using a dictionary which
stored country name, capitals and populations of the country.

Output :
Q12. Write a Pandas program to compare the
elements of the two Pandas Series

Output :
Q13. Program to combine many series to form a dataframe

Output :
Q14. Read the ‘Students1.csv’ to create a data frame and do the
following operation:
# To display Adm_No, Gender and Percentage from ‘students1.csv’ file.
# To display the first 5 and last 5 records from ‘students1.csv’ file.

Output :
CSV File :
Q15. Read the ‘Student_result.csv’ to create a data frame and do the
following operation:
# To display Student_result file with new column names.
# To modify the Percentage of student below 40 with NaN value in dataframe.

Output :
CSV File :
Q16. Plot following data on line chart and follow the given instructions:

Write a title for the chart “The Weekly Income Report”.


1. Write the appropriate titles of both axes.
2. Write code to Display legends.
3. Display red color for the line.
4. Use the line style – dashed
5. Display diamond-style markers on data points

Output :
Q17. Consider the following data of a medical store and plot the data on the line chart:

Customize the chart as you wish.

Output :
Q18. Observe following data and plot data according to given instructions:

Create a bar chart to display data of Virat Kohli, Rohit Sharma, Steve
Smith, Kane Williamson & Jos Buttler. Customize Chart as per your wish

CSV File :

Output :
Q19. Write python code to create histogram based on given data:
75, 80, 85, 90, 92, 88, 78, 82, 87, 95, 98, 88, 92, 86, 89

Output :
Mysql
Queries
Create the following table cricketer and
write queries given below:
Table: Cricketer

1. Create Table command

2. Insert Value command:


3. Convert name into Uppercase

4. Show Jersey No. and Name of Cricketers


who have played more than 150 matches.
5. Show Jersey no. and Name of Cricketers
having even Jersey No.

6. Show Name, Jersey No. and Runs of


Cricketer having Maximum Runs.

7. Show all details of Cricketers and calculate their


averages and display in descending order.
8. Show Name and Runs of Cricketers in
descending order of runs.

9. Show the Name and Runs of


only Indian Cricketers.
10. Show the no. of cricketers of each
team in descending order.

11. Show total no. of Unique Teams.

12. Show the teams having


more than one cricketer
13. Show the difference between maximum and
minimum runs of Cricketers.

14. Show name and team of Cricketers having name of


more than 12 characters.

15. Show the first 5 letter of name of Cricketers

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy