0% found this document useful (0 votes)
6 views4 pages

DRA Lab Exp4

The document outlines an experiment using the NumPy module to analyze a dataset of student roles in a group project. It includes a Python program that loads a CSV file, counts the number of students in each role, and filters for Team Leaders. The results show the original dataset, role counts, and a list of Team Leaders, confirming successful execution of the program.

Uploaded by

bborigarla
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)
6 views4 pages

DRA Lab Exp4

The document outlines an experiment using the NumPy module to analyze a dataset of student roles in a group project. It includes a Python program that loads a CSV file, counts the number of students in each role, and filters for Team Leaders. The results show the original dataset, role counts, and a list of Team Leaders, confirming successful execution of the program.

Uploaded by

bborigarla
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/ 4

DATE:

EXPRIMENT-4
NUMPY MODULE
AIM: To implement python program by using numpy module .

SOURCE CODE:

import pandas as pd

# Step 1: Load the dataset from CSV

data = pd.read_csv('students_roles.csv')

# Display the loaded data

print("Original Dataset:")

print(data)

# Step 2: Analyze the Data

# Count the number of students in each role

role_counts = data['role'].value_counts()

# Display role counts

print("\nNumber of Students per Role:")

print(role_counts)

# Filter students who are Team Leaders

team_leaders = data[data['role'] == 'Team Leader']

# Display Team Leaders

print("\nList of Team Leaders:")

print(team_leaders)
DATASET DESCRIPTION:

This dataset represents the roles assigned to students in a group project setting. Each student is given a
specific role, which defines their responsibilities within the group. The roles include Team Leader,
Member, and Coordinator. This dataset can be useful for understanding the distribution of
responsibilities among students and analyzing role assignments within a group or team structure.
Columns:
1. student: The name of each student involved in the project.
2. role: The assigned role for each student, representing their position and responsibilities within the group.
Data give below:

student role

Lokeswar Team Leader

Ratnam Member

Vignesh Coordinator

Rajeev Member

Ganesh Team Leader

. Save data set by ‘students_roles.csv’.

OUTPUT:
Original Dataset:

student role

Lokeswar Team Leader

Ratnam Member

Vignesh Coordinator

Rajeev Member

Ganesh Team Leader


Number of Students per Role:
Member 2
Team Leader 2
Coordinator 1
Name: role, dtype: int64
List of Team Leaders:

student role

Lokeswar Team Leader

Ganesh Team Leader

RESULT:
Numpy module developed by using Student and role data set is successfully executed.

You might also like