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.0
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.0.tar.gz | 10.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pythonlabtools-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.2 kB
Release files / pythonlabtools-2.0.0.tar.gz
| Download URL | pythonlabtools-2.0.0.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a849a82fd293dbe3621186f69689c572d99fa6b50a8dc023c98807849a16aad1
|
|
BLAKE2b-256 checksum How to use checksums |
0b0936efdbccab633fcddca2fd6f1f40258b7cee351edfeb12e4ab0902e14744
|
| 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.0-py3-none-any.whl
| Download URL | pythonlabtools-2.0.0-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4edc96c4bd04cb77f022fe6fc775583042f9620df2ecb54d4f22b6830969bc3c
|
|
BLAKE2b-256 checksum How to use checksums |
472394c263b7a56311a66f3790f2e7e6411918be63d980599140056532ff0c18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.2
|