Problem 2: Filter Students Who Passed
Easypython
Problem Description
Write a Python program that creates a DataFrame of students with their marks, then filters and prints only the students who scored 40 or above.
Input
A DataFrame with "name" and "marks" columns.
Output
A filtered DataFrame containing only the passing students.
Constraints
- Marks range from 0 to 100.
Example Input
text{"name": ["Aarav", "Meera", "Kabir"], "marks": [30, 92, 45]}
Example Output
textname marks 1 Meera 92 2 Kabir 45
Concepts Covered
DataFrame filtering with conditions.