Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Other

Data Science and Visualization - Lab File

Rating
-
Sold
-
Pages
76
Uploaded on
27-02-2026
Written in
2025/2026

This lab file contains the practical work completed as part of the Data Structures and Visualization (DSV) subject. The main objective of this lab is to understand how different data structures work and how they can be implemented using programming concepts. It also helps in visualizing how data is stored, accessed, and processed efficiently. Through this lab, various fundamental data structures such as arrays, stacks, queues, linked lists, trees, and searching and sorting techniques are studied and implemented. Each experiment includes the problem statement, algorithm, program code, output, and conclusion to provide a clear understanding of the concept. The purpose of this lab work is to develop logical thinking, problem-solving ability, and programming skills. It also helps in understanding real-world applications of data structures and how they improve the performance and efficiency of software systems. All programs in this lab file are written, executed, and tested as per the syllabus guidelines. The outputs are verified, and the observations are recorded carefully. This lab file reflects the practical knowledge gained during the course and demonstrates the implementation and visualization of important data structure concepts.

Show more Read less
Institution
Course

Content preview

Practical: 01
Aim: - Perform Descriptive statistics on given data set.
This program analyzes student performance across four semesters using
Python and Pandas It provides both statistical insights and visualizations.
The dataset includes students' names, genders, Enrollment numbers,
semester marks, mobile numbers, and cities.



Key Features:

1. Overall, Class Performance → Boxplot distribution of semester marks.

2. Gender-based Performance → Comparison of average marks between
male and female students.

3. Semester-wise Progress → Line graph of class average performance
over semesters.

4. Subject-wise Strengths & Weaknesses → Bar chart showing each
student’s marks per semester.

5. Correlation Analysis → Heatmap showing correlation between semester
performances.



Outputs:

- Descriptive statistics in the console.


Code:

import pandas as pd

import matplotlib.pyplot as plt



# Dataset with given names

data = {

'Name': ['Dhruvil', 'Ridhhi', 'Divyesh', 'Yash', 'Om', 'Purva'],

'Gender': ['M', 'F', 'M', 'M', 'M', 'F'],

'EnrollmentNo': [101, 102, 103, 104, 105, 106],

'Semester1_Marks': [78, 85, 62, 90, 74, 88],

'Semester2_Marks': [82, 79, 70, 88, 69, 91],

, 'Semester3_Marks': [74, 92, 68, 84, 71, 89],

'Semester4_Marks': [80, 87, 72, 91, 76, 90],

'MobileNo': ['9991112222', '8882223333', '7773334444', '6664445555',
'5556667777', '4447778888'],

'City': ['Delhi', 'Mumbai', 'Chennai', 'Delhi', 'Kolkata', 'Pune']

}



# Create DataFrame

df = pd.DataFrame(data)



# Overall descriptive statistics

print("Overall Class Performance:")

print(df.describe())



# Gender-based average performance

gender_avg = df.groupby('Gender')
[['Semester1_Marks','Semester2_Marks','Semester3_Marks','Semester4_M
arks']].mean()

print("\nGender-based Performance:")

print(gender_avg)



# Semester-wise progress (class average)

semester_avg =
df[['Semester1_Marks','Semester2_Marks','Semester3_Marks','Semester4_
Marks']].mean()

print("\nSemester-wise Progress (Class Average):")

print(semester_avg)



# Correlation between semesters

,correlation =
df[['Semester1_Marks','Semester2_Marks','Semester3_Marks','Semester4_
Marks']].corr()

print("\nCorrelation between Semesters:")

print(correlation)



# Overall Class Performance (Boxplot)

plt.figure()

df[['Semester1_Marks','Semester2_Marks','Semester3_Marks','Semester4_
Marks']].boxplot()

plt.title("Overall Class Performance (Marks Distribution)")

plt.ylabel("Marks")

plt.savefig("overall_class_performance.jpeg", format='jpeg')

plt.show()



# Gender-based Performance

plt.figure()

gender_avg.T.plot(kind='bar')

plt.title("Gender-based Performance Comparison")

plt.xlabel("Semesters")

plt.ylabel("Average Marks")

plt.savefig("gender_based_performance.jpeg", format='jpeg')

plt.show()



# Semester-wise Progress Trend

plt.figure()

semester_avg.plot(marker='o')

plt.title("Semester-wise Progress (Class Average)")

plt.xlabel("Semester")

plt.ylabel("Average Marks")

, plt.savefig("semester_wise_progress.jpeg", format='jpeg')

plt.show()



# Subject-wise Strengths/Weaknesses

plt.figure()

df.set_index('Name')
[['Semester1_Marks','Semester2_Marks','Semester3_Marks','Semester4_M
arks']].plot(kind='bar')

plt.title("Subject-wise Strengths and Weaknesses")

plt.xlabel("Students")

plt.ylabel("Marks")

plt.savefig("subject_strengths_weaknesses.jpeg", format='jpeg')

plt.show()



# Correlation Heatmap

plt.figure()

plt.imshow(correlation, cmap='coolwarm', interpolation='none')

plt.colorbar(label='Correlation Coefficient')

plt.xticks(range(len(correlation)), correlation.columns, rotation=45)

plt.yticks(range(len(correlation)), correlation.columns)

plt.title("Correlation between Academic Periods")

plt.savefig("correlation_heatmap.jpeg", format='jpeg')

plt.show()


Output:

1. Console:

Written for

Institution
Course

Document information

Uploaded on
February 27, 2026
Number of pages
76
Written in
2025/2026
Type
OTHER
Person
Unknown

Subjects

$7.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
prathamparikh701

Get to know the seller

Seller avatar
prathamparikh701 Charutar Vidya Mandal University
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 months
Number of followers
0
Documents
3
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions