Python Data Foundations Documentation

A documentation-style guide for Python, data handling, visualization, and machine learning basics.

Overview

This documentation site serves as a instruction manual for python basics. It keeps the code concepts, outputs, tasks, and explanations simple for beginners.

The site contains 165 code listings and 47 note cells organized by topic.

How to use this documentation

  1. Start with the topic you need from the left-hand contents list.
  2. Read the short concept notes at the top of the page.
  3. Copy code listings into a notebook, Colab, or a Python file when you want to run them.
  4. For Colab-only commands, such as Drive mounting and file upload helpers, run the code in Colab or adapt the path/file logic for local VS Code.

Topic map

PageWhat it teaches
Python Environment and Colab WorkflowThis page covers the first workflow patterns: executing Python, checking the runtime, using loops, storing dictionaries, and mounting Drive in Colab.
Image Processing with Pillow and OpenCVThis page demonstrates loading, inspecting, cropping, resizing, blurring, changing pixels, and displaying images with Pillow, Matplotlib, and OpenCV.
Local Files, Downloads, Drive, and UploadsThis page collects the file workflow commands from the notebook: writing files, downloading files, saving to Drive, and uploading files in Colab.
Dataset Loading: Iris, seaborn, and scikit-learnThis page explains how to load the Iris dataset from seaborn and scikit-learn, inspect dataset metadata, and separate features from labels.
NumPy Arrays, Statistics, Splitting, and Iris PlotsThis page covers array indexing, slicing, basic statistics, manual train/test splits, train_test_split, class counts, and simple Iris visualizations.
Image Datasets and OpenMLThis page covers image datasets, the Olivetti faces dataset, OpenML fetching, vector-to-image reshaping, and subplot grids.
Generated Data and Coordinate PlotsThis page shows how to generate random integer and decimal data, create coordinate pairs, plot points, and select dimensions from generated matrices.
Clustering with k-meansThis page explains unsupervised clustering with generated points and with the Iris dataset, including centroids, cluster labels, elbow evaluation, and silhouette score.
Linear RegressionThis page covers simple linear regression with height and weight, train/test splitting, prediction, coefficients, and multivariate regression on car data.
Classification with KNN and Gaussian Naive BayesThis page covers Iris classification with K-Nearest Neighbors and Gaussian Naive Bayes, including accuracy, confusion matrix, precision, recall, F1-score, and classification reports.