IP 12th Practical File
IP 12th Practical File
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:
Output :
Q17. Consider the following data of a medical store and plot the data on the line chart:
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