Informatics Practical File (Upl Fil)
Informatics Practical File (Upl Fil)
1|Pa g e
1. Top 3 Largest and Smallest Areas in a Data Series
AIM:
To find out biggest and smallest values from given series
PROGRAM:
Given a Series that stores the areas of some states in km^2. Write a code to find out
the biggest and smallest three areas from the given Series.
LIBRARY USED:
Pandas
SOURCE CODE:
OUTPUT:
2|Pa g e
2. Data Series and Indexing
AIM: Write a program to create a data series and then change the
indexes of the series object in random order.
LIBRARY USED: Pandas
SOURCE CODE:
OUTPUT:
3|Pa g e
3.Series Sorting
AIM:
Write a program to sort the values of a series object s1 in descending
order of its indexes and store it into series object s3.
LIBRARY USED:
Pandas
SOURCE CODE:
OUTPUT:
4|Pa g e
4.Square of Series Values Greater than 15
AIM:
Given a series object s5, store the squares of series values in s6 and
display values > 15.
LIBRARY USED:
Pandas
SOURCE CODE:
OUTPUT:
5|Pa g e
5. Temperature Data Series
AIM:
Create a Series object Temp1 to store temperatures of seven random
days.
SOURCE CODE:
OUTPUT:
6|Pa g e
6. DataFrame Column Selection
AIM: Write a Pandas program to select the 'name' and 'score' columns
from a DataFrame.
SOURCE CODE:
OUTPUT:
7|Pa g e
7. Handling Missing Data
AIM: Select rows where the score is missing (NaN) in the DataFrame.
SOURCE CODE:
OUTPUT:
8|Pa g e
8. Append Data to DataFrame
AIM: Append a dictionary to the existing DataFrame.
LIBRARY USED: Pandas
SOURCE CODE:
9|Pa g e
OUTPUT:
10 | P a g e
9. Calculating Weighted Marks
AIM: Calculate final marks from three term Series using weighted
formula.
SOURCE CODE:
OUTPUT:
11 | P a g e
10. Creating Series Objects from Rows
of a DataFrame
AIM: Write a program to create three different Series objects from the
three rows of a DataFrame df.
SOURCE CODE:
OUTPUT:
12 | P a g e
11. Creating a DataFrame from a List
of Dictionaries
AIM: A list stores three dictionaries, each storing details of old
price, new price, and change. Write a program to create a
DataFrame from this list.
SOURCE CODE:
OUTPUT
13 | P a g e
DATA VISUALIZATION
SOURCE CODE:
14 | P a g e
OUTPUT:
15 | P a g e
13. Plotting Monthly Orders on a
Horizontal Bar Chart
AIM: Navya has an online business. Write a program to plot the number
of orders in the last 6 months on a horizontal bar chart.
SOURCE CODE:
OUTPUT:
16 | P a g e
14. CREATING HISTOGRAMS
AIM: Given weight measurements (in grams) for 16 small orders of
French-fries, create different types of histograms:
SOURCE CODE:
a) Himple histogram
b) Horizontal histogram
c) Step-type histogram
d) Cumulative histogram
17 | P a g e
OUTPUT:
a)
b)
18 | P a g e
c)
d)
19 | P a g e
15. Plotting Multiple Datasets on the
Same Histogram
AIM: Create an ndarray with 16 values and plot this array along with the
previous weight dataset on the same histogram:
o (a) Normal histogram
o (b) Cumulative histogram
o (c) Horizontal histogram
SOURCE CODE:
a) Normal Histogram
b) Cumulative Histogram
c) Horizontal Histogram
20 | P a g e
OUTPUT:
a)
b)
c)
21 | P a g e
16.Creating a Bar Graph for Favorite
Ice Cream Flavors
AIM: Write a program to create a bar graph showing the favorite ice
cream flavors among students.
SOURCE CODE:
OUTPUT:
22 | P a g e
17. CREATING A BAR GRAPH
AIM: Write a program to create a grouped bar graph showing the amounts of
different vegetables sold at Frank's Farm Stand over three days.
SOURCE CODE:
OUTPUT:
23 | P a g e
18. DataBase Management System
24 | P a g e
25 | P a g e
AIM: Find the total number of customers from each country in the table (customer
ID, customer Name, country) using group by.
SOURCE CODE:
OUTPUT:
AIM: Write a SQL query to order the (student ID, marks) table in descending
order of the marks.
SOURCE CODE:
OUTPUT:
26 | P a g e
27 | P a g e