================================================================================
  Question 33: Pandas Series to DataFrame & Pass/Fail Categorization
================================================================================

FULL QUESTION:
Task:
1. Create individual Pandas Series for storing the details of 5 students:
   Name, Age, Course, and Marks.
2. Convert these Series into a DataFrame.
3. Add a new column to categorize students as Pass (marks >= 40) or Fail (marks < 40).
4. Display only the students who passed.

SHORT QUESTION:
Builds Pandas Series for student attributes, merges into a DataFrame, assigns Pass/Fail status, and filters passing students.

================================================================================
README & SETUP INSTRUCTIONS:
================================================================================
# Question 33: Pandas Series to DataFrame & Pass/Fail Categorization

- Prerequisites: Python 3.x, Pandas (pip install pandas).
- Setup: None.
- How to Run: python question_33.py
- Expected Behavior: Constructs Series, creates DataFrame, categorizes based on marks >= 40, and displays passing students.

================================================================================
SOURCE CODE FILES:
================================================================================

1. question_33.py
--------------------------------------------------------------------------------
import pandas as pd

name = pd.Series(["Alice", "Bob", "Charlie", "David", "Eva"], name="Name")
age = pd.Series([21, 22, 20, 23, 21], name="Age")
course = pd.Series(["MSc CS", "MSc DS", "MSc IT", "MSc CS", "MSc DS"], name="Course")
marks = pd.Series([85, 35, 62, 38, 91], name="Marks")

df = pd.DataFrame({
    "Name": name,
    "Age": age,
    "Course": course,
    "Marks": marks
})

print("Original DataFrame:")
print(df)
print("=" * 50)

df["Status"] = df["Marks"].apply(lambda x: "Pass" if x >= 40 else "Fail")

print("DataFrame with Pass/Fail Status:")
print(df)
print("=" * 50)

passed_students = df[df["Status"] == "Pass"]

print("Students Who Passed:")
print(passed_students)
--------------------------------------------------------------------------------
