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

Anna University Lab Guide & Test Cases

The document outlines the guidelines for the Anna University Practical Lab, detailing entry procedures, question selection, preparation steps, internal verification, implementation, and viva voce expectations. It also includes five test cases for data analysis using Google Colab and Pandas, covering tasks related to sales reports, temperature tracking, COVID-19 cases, movie ratings, and online course completion. Each test case provides a structured approach and Python implementation for data handling and visualization.

Uploaded by

mohanaramanan75
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)
5 views4 pages

Anna University Lab Guide & Test Cases

The document outlines the guidelines for the Anna University Practical Lab, detailing entry procedures, question selection, preparation steps, internal verification, implementation, and viva voce expectations. It also includes five test cases for data analysis using Google Colab and Pandas, covering tasks related to sales reports, temperature tracking, COVID-19 cases, movie ratings, and online course completion. Each test case provides a structured approach and Python implementation for data handling and visualization.

Uploaded by

mohanaramanan75
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

Rough Note Text

Certainly! Here’s a **comprehensive guide** that combines all the details you’ve provided for
your **Anna University Practical Lab** and **test cases** using **Google Colab and Pandas**
for data analysis.

---

## **Anna University Practical Lab Guidelines**


### **1. Entry & Seating**
- Students must sit in assigned seats as per the instructor’s seating plan.
- - Avoid unnecessary movement within the lab.

### **2. Question Selection**


- A random question from a given set will be selected.
- - Focus on **fully understanding** the task before implementation.

### **3. Preparation**


Each practical exam follows **structured preparation**:
1. **Aim**: Define the purpose of the practical task.
2. 2. **Requirements**: List all required hardware, software, and tools.
3. 3. **Algorithm**: Outline step-by-step logic for solving the problem.
4. 4. **Procedure**: Document the implementation steps.
5. 5. **Program**: Write the code on paper before implementing it.
6. 6. **Output & Result**: Ensure expected output matches problem objectives.
### **4. Internal Verification**
- Present your **written plan** (aim, requirements, algorithm, procedure, program, output, and
result) to the **internal examiner** for verification.
- - Only after approval can students proceed to coding.

### **5. Implementation & Execution**


- Begin coding following the **verified written plan**.
- - Test thoroughly to ensure **correct output**.

### **6. Viva Voce**


Students should be ready to answer questions from **external examiners** on:
- **Algorithm logic** (why steps are structured a certain way).
- **Functions & syntax** (why certain Pandas or visualization functions were used).
- **Error handling** (how missing data or duplicates were processed).

### **7. Completion & Exit**


- Execute and verify your program’s output.
- - Submit work as instructed by examiners.
- Upon approval, exit the lab.
### **8. Marks Allocation (Anna University Data Analytics Lab)**
| Criteria | Marks |
|---------------------|------|
| Aim | 10 |
| Requirements Needed | 10 |
| Algorithm & Procedure | 30 |
| Program & Output | 40 |
| Result | 10 |
| **Total** | 100 |

---

## **Test Case 1: Simple Sales Report**


### **Dataset Columns**: `Product, Quantity, Price`
### **Tasks**
1. Load the dataset in **Google Colab**.
2. 2. Fill missing values in **"Price"** with the **average price per product**.
3. 3. Add a column: `Total_Sales = Quantity × Price`.
4. 4. Identify the **product with the highest total sales**.
5. 5. **Visualization**: Bar chart for **total sales by product**.
#### **Python Implementation**
```python
import pandas as pd
import [Link] as plt
import seaborn as sns

# Load dataset
df = pd.read_csv('sales_data.csv')

# Fill missing values in "Price" with the average price per product
df['Price'] = [Link]('Product')['Price'].transform(lambda x: [Link]([Link]()))

# Calculate total sales


df['Total_Sales'] = df['Quantity'] * df['Price']

# Identify highest-selling product


top_product = [Link][df['Total_Sales'].idxmax()]
print(f"Highest-selling product: {top_product['Product']}")

# Bar chart visualization


[Link](figsize=(10,6))
[Link](x='Product', y='Total_Sales', data=df, palette='viridis')
[Link](rotation=45)
[Link]('Total Sales by Product')
[Link]()
```

---

## **Test Case 2: Daily Temperature Tracker**


### **Dataset Columns**: `Date, Min_Temp, Max_Temp`
### **Tasks**
1. Load dataset and handle missing values by **filling with column averages**.
2. 2. Add a column: `Average_Temp = (Min_Temp + Max_Temp) / 2`.
3. 3. Identify **date with highest average temperature**.
4. 4. **Visualization**: Line graph showing **temperature trend**.
#### **Python Implementation**
```python
# Load dataset
df = pd.read_csv('temperature_data.csv')

# Fill missing values with column averages


[Link]([Link](), inplace=True)

# Calculate average temperature


df['Average_Temp'] = (df['Min_Temp'] + df['Max_Temp']) / 2

# Identify the hottest day


hottest_day = [Link][df['Average_Temp'].idxmax()]
print(f"Hottest day: {hottest_day['Date']} with {hottest_day['Average_Temp']}°C")

# Line chart visualization


[Link](figsize=(10,6))
[Link](x='Date', y='Average_Temp', data=df, marker='o', color='red')
[Link](rotation=45)
[Link]('Daily Average Temperature Trend')
[Link]()
```

---

## **Test Case 3: COVID-19 Daily Cases**


### **Dataset Columns**: `Date, Cases`
### **Tasks**
1. Load dataset.
2. 2. Replace missing/null case values with **0**.
3. 3. Calculate **total and average daily cases**.
4. 4. Identify **date with highest cases**.
5. 5. **Visualization**: Line graph for **daily case trends**.
#### **Python Implementation**
```python
# Load dataset
df = pd.read_csv('covid_cases.csv')

# Fill missing values in "Cases" column with 0


df['Cases'].fillna(0, inplace=True)

# Calculate total and average cases


total_cases = df['Cases'].sum()
average_cases = df['Cases'].mean()
print(f"Total Cases: {total_cases}")
print(f"Average Daily Cases: {average_cases}")

# Identify date with highest cases


highest_cases_day = [Link][df['Cases'].idxmax()]
print(f"Highest cases on: {highest_cases_day['Date']} with {highest_cases_day['Cases']} cases")

# Line graph visualization


[Link](figsize=(10,6))
[Link](x='Date', y='Cases', data=df, marker='o', color='blue')
[Link](rotation=45)
[Link]('Daily COVID-19 Cases Trend')
[Link]()
```

---

## **Test Case 4: Movie Ratings Dataset**


### **Dataset Columns**: `Movie_Name, Viewer_Rating`
### **Tasks**
1. Load dataset and remove rows with **missing ratings**.
2. 2. Calculate **average rating**.
3. 3. Identify the **top 3 highest-rated movies**.
4. 4. **Visualization**: Bar chart of **ratings for top 5 movies**.
---

## **Test Case 5: Online Course Completion Data**


### **Dataset Columns**: `Student_ID, Completion_Status (Yes/No)`
### **Tasks**
1. Load dataset.
2. 2. Fill missing values in **Completion_Status** with `"No"`.
3. 3. Count how many students **completed the course**.
4. 4. **Visualization**: Pie chart showing **completion vs non-completion**.
---

🎯
This consolidated document provides **a detailed overview** of the practical lab structure,
expectations, and all test cases with Python implementations.

Would you like me to refine any part further or add additional insights? 🚀

You might also like