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:
pip install .
Then:
from pythonlabtools import *
Google Colab
Upload the ZIP, extract it, and install:
!unzip -q /content/pythonlabtools-exam-toolkit-v2.zip -d /content/
!pip install /content/pythonlabtools_exam_toolkit
Or after extracting:
%cd /content/pythonlabtools_exam_toolkit
!pip install .
Example
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:
groupbyconcatmergefillnaget_dummiesStandardScalertrain_test_splitfitpredict- R2 / MAE / MSE / RMSE
- accuracy / recall / confusion matrix
- K-Means / inertia / PCA
- support / confidence / lift
Metadata
Release files for pythonlabtools 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pythonlabtools-2.0.1.tar.gz | 22.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pythonlabtools-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.8 kB
Release files / pythonlabtools-2.0.1.tar.gz
| Download URL | pythonlabtools-2.0.1.tar.gz |
|---|---|
| Size | 22.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad33ecfddd74d3ddf966938b1de40aea521819ec89fa440b9ba45278c26753a5
|
|
BLAKE2b-256 checksum How to use checksums |
c02eb0272b759e4d7516ab752798feb13588cb1db787d55db1216fe7ae01b86d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|
Release files / pythonlabtools-2.0.1-py3-none-any.whl
| Download URL | pythonlabtools-2.0.1-py3-none-any.whl |
|---|---|
| Size | 25.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db8ae50d48a62d6e1e44d22c9d5776657b3b4b44ab7457b3ea70228b83ee2f10
|
|
BLAKE2b-256 checksum How to use checksums |
59dd44555e852d29002c08b698a4ef7ab9f9721c359405b4efd9268e47a3f123
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|