https://github.com/farhad-here/student_performance_analyzer
Student Performance Analyzer with python, it is on of my data analysis course project. I teach you about filter(),lambda,map() in python
https://github.com/farhad-here/student_performance_analyzer
data-analysis data-visualization filter kaggle kaggle-dataset lambda map pandas python python-tutorial streamlit
Last synced: 4 months ago
JSON representation
Student Performance Analyzer with python, it is on of my data analysis course project. I teach you about filter(),lambda,map() in python
- Host: GitHub
- URL: https://github.com/farhad-here/student_performance_analyzer
- Owner: farhad-here
- License: mit
- Created: 2025-04-30T13:36:18.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-05-29T07:43:05.000Z (5 months ago)
- Last Synced: 2025-06-27T10:06:56.847Z (4 months ago)
- Topics: data-analysis, data-visualization, filter, kaggle, kaggle-dataset, lambda, map, pandas, python, python-tutorial, streamlit
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π Student Score Insights
This project analyzes the **Students Performance in Exams** dataset using Python's functional programming tools (`map`, `filter`, and `lambda`) and builds an interactive web dashboard using **Streamlit**.
## π Dataset
We use the **Students Performance in Exams** dataset, which includes:
- Gender
- Race/ethnicity
- Parental level of education
- Lunch type
- Test preparation course
- Math score
- Reading score
- Writing score
π [Download Dataset from Kaggle](https://www.kaggle.com/datasets/spscientist/students-performance-in-exams)
---
## π Features
- Clean and preprocess the dataset
- Use `filter()` to select students based on specific criteria
- Use `map()` to apply calculations (like average scores) to each student
- Use `lambda` functions for quick and readable inline operations
- Display results and visualizations using **Streamlit**
---
## π οΈ How to Run
1. Clone the repo:
```bash
git clone https://github.com/your-username/student-score-insights.git
cd student-score-insights
# `lambda`
## πWhat is `lambda` in Python?
A `lambda` function is an **anonymous (nameless)** function in Python. It's used when you need a **simple, short function** and don't want to formally define it using `def`.
### π§ Syntax:
```python
lambda arguments: expression
```
### β
Example:
```python
square = lambda x: x * x
print(square(5)) # Output: 25
```
This is the same as:
```python
def square(x):
return x * x
```
### π‘ Use Cases:
- Used with functions like `map()`, `filter()`, `sorted()`, etc.
- Best for short, one-line functions.
# `map()`
## π What is `map()` in Python?
`map()` applies a **function** to **every item** in an iterable (like a list or tuple).
### π§ Syntax:
```python
map(function, iterable)
```
### β
Example 1 β with `lambda`:
```python
nums = [1, 2, 3, 4]
doubled = list(map(lambda x: x * 2, nums))
print(doubled) # Output: [2, 4, 6, 8]
```
### β
Example 2 β with a defined function:
```python
def square(x):
return x * x
nums = [1, 2, 3]
squared = list(map(square, nums))
print(squared) # Output: [1, 4, 9]
```
---
# `filter()`
## π What is `filter()` in Python?
`filter()` is used to **filter items** from an iterable using a **condition (function)** that returns `True` or `False`.
### π§ Syntax:
```python
filter(function, iterable)
```
### β
Example:
```python
nums = [1, 2, 3, 4, 5]
even = list(filter(lambda x: x % 2 == 0, nums))
print(even) # Output: [2, 4]
```
### β
Another Example:
```python
def is_positive(n):
return n > 0
nums = [-3, 1, 0, 5, -1]
positive_nums = list(filter(is_positive, nums))
print(positive_nums) # Output: [1, 5]
```
---