Python prg list practical 2024-25
Python prg list practical 2024-25
Series
1. Write a python program to create a series with names of the days and print it.
2. Write a python program to create a series using a numpy array of vowels and print the
series
3. Write a python program to create a series from a dictionary storing names of your three
friends(key) and their phone numbers(value). Print the series.
4. Write a python program to create a series of 5 integers and calculate the cubes of the
series elements and print them.
5. Write a python program to create the following series and assign a name to it-Planets
num_moons
mars 4
venus 7
mercury 3
earth 1
neptune 4
uranus 7
saturn 12
jupiter 10
goals1
hurricanes 4
champs 7
winners 3
destroyers 1
goals1
hurricanes 4
champs 7
winners 3
12.write a Python program to create a Series using a list of Marks of 10 students and
display first 5 Students’ marks and Last 2 Students’ marks from the Series object.
Data Frames
13. Consider the following DataFrame- temperature
Monday 34 27 30
Tuesday 39 21 33
Wednesday 38 20 34
14. Write a Python program to create a pandas DataFrame to analyze the number of
Government and Private medical colleges and their Total seats,Fees state wise details using
the dataset available at www.data.gov.in. Also, perform the following operations.
AIIMS 78 55 132568
UCMC 44 5 142855
ESI 12 44 110363
15. Write a Python program to create a dataframe of Employees' with columns Empno, Name,
Salary and save it into an Employee.csv file.
Data Visualization
telangana 78 55 78
AP 44 78 55
kerala 12 44 63
a. Create a line graph between states and Ragi with following specifications
- Line color: blue
- Thickness: 10 points
- Display gridlines and appropriate labels on axis and the title
b. Create a bar graph between states and jowar with following specifications
- Bar width: 0.7
- Bar color: red
- Display gridlines and appropriate labels on axis and the title
17. Write a Python program to create a DataFrame for students and marks in 5 subject.Save it
to a CSV file, and then draw a bar chart using Matplotlib for all the subjects. The width of each
bar should be 0.25 and the color should be different for each subject. Additionally, provide a
proper title and axes labels for the bar chart.
18..Write a Python program to plot a Line chart to depict the changing weekly tomato and potato
prices for four weeks. Also, give appropriate axes labels, title and set marker style as Diamond
and marker line color as ‘red’ for tomato and green for potato
19.Write a python program to Collect the minimum and maximum temperature of your city for a
fortnight and present it using a histogram plot. Proper labels, a title and a legend are to be
displayed on the chart.
20. Write a Python program to plot a Line chart to depict the changing yearly trend of sale of I
phones in India.Additionally, provide a proper title and axes labels for the bar chart.