Metadata-Version: 2.4
Name: pythonlabtools
Version: 2.0.1
Summary: Reusable Python lab exam toolkit for NumPy, Pandas, preprocessing, plotting and machine learning.
Author: JP
License: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.23
Requires-Dist: pandas>=1.5
Requires-Dist: matplotlib>=3.6
Requires-Dist: scikit-learn>=1.2

# PythonLabTools — Python Lab Exam Toolkit

Version 2.0.0

This package turns common Python lab-exam programs into reusable functions.

## Covered areas

- NumPy arrays and slicing
- Pandas DataFrames, filtering, grouping, joining and merging
- Missing values and dirty-data preprocessing
- Categorical encoding
- Feature scaling and train/test splitting
- Line, bar, scatter, histogram and multiple plots
- Correlation heatmaps
- Regression: Linear Regression, Decision Tree, Random Forest
- Classification: Logistic Regression, Decision Tree, Random Forest
- Classification metrics and confusion matrix
- K-Means clustering and Elbow method
- PCA
- Association-rule calculations: support, confidence and lift
- Simple SQLite CRUD helpers
- Exam templates

## Install locally

Extract the ZIP, open a terminal in the extracted folder:

```bash
pip install .
```

Then:

```python
from pythonlabtools import *
```

## Google Colab

Upload the ZIP, extract it, and install:

```python
!unzip -q /content/pythonlabtools-exam-toolkit-v2.zip -d /content/
!pip install /content/pythonlabtools_exam_toolkit
```

Or after extracting:

```python
%cd /content/pythonlabtools_exam_toolkit
!pip install .
```

## Example

```python
import pandas as pd
from pythonlabtools import show_missing, fill_missing_mean
from pythonlabtools import line_plot

df = pd.DataFrame({
    "Day": ["Mon", "Tue", "Wed"],
    "Temperature": [30, None, 32]
})

show_missing(df)
df = fill_missing_mean(df, "Temperature")

line_plot(
    df["Day"],
    df["Temperature"],
    title="Temperature vs Day",
    xlabel="Day",
    ylabel="Temperature"
)
```

## Important exam principle

Use the toolkit to save typing, but understand what each function does.
In a viva, you should be able to explain:

- `groupby`
- `concat`
- `merge`
- `fillna`
- `get_dummies`
- `StandardScaler`
- `train_test_split`
- `fit`
- `predict`
- R2 / MAE / MSE / RMSE
- accuracy / recall / confusion matrix
- K-Means / inertia / PCA
- support / confidence / lift
