Data Science Cheat Sheet
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. |
Four single-page, colour-coded summaries of the Data Science section, one per part: the general workflow, NumPy, pandas and scikit-learn. They reflect Python 3.12 or newer, NumPy 2.5, pandas 3.1 and scikit-learn 1.9 as checked in October 2026, and each is available as a downloadable PDF.
Data Science
The workflow phases, environment commands (venv, uv and conda), Jupyter shortcuts and magics, an exploratory data analysis checklist, choosers for statistical tests, charts and metrics, and the rules for avoiding leakage and keeping results reproducible, with the targeted versions (Python 3.12 or newer, NumPy 2.5, pandas 3.1, scikit-learn 1.9).
For the full explanation, every option and additional examples, see the dedicated pages:
Beyond the Core: Polars, Arrow, DuckDB & Deep Learning, Choosing Tools & Learning Path, Data Cleaning & Preparation, Data Sources & File Formats, Data Visualization, Ethics, Privacy & Responsible Data Use, Exploratory Data Analysis, Feature Engineering, Jupyter Notebooks & JupyterLab, Machine Learning Fundamentals, Model Evaluation & Validation, Reproducibility & MLOps Basics, Setting Up a Data Science Environment, Statistics Fundamentals, The Data Science Workflow, The Scientific Python Stack, and What Is Data Science?.
NumPy
Array creation, indexing with views versus copies, dtypes and type promotion, broadcasting, ufuncs and reductions, linear algebra, the random Generator, file input and output, and the NumPy 2 renames.
For the full explanation, every option and additional examples, see the dedicated pages:
Advanced and Boolean Indexing, Basic Indexing and Slicing, Broadcasting, C-API, Cython and F2PY, Copies and Views, Data Types, Dates and Times with datetime64, Discrete Fourier Transforms, Floating-Point Errors and errstate, Interoperability: Protocols and DLPack, Linear Algebra, Masked Arrays, Memory Layout and Strides, Migrating to NumPy 2.x, NumPy Array Creation, NumPy Installation and Versions, NumPy Ranges and Grids, Polynomials, Printing Arrays, Random Numbers with Generator, Reading & Writing Files, Reductions and Axis Semantics, Reshaping, Stacking & Splitting, Seeding, Reproducibility & Parallel Streams, Set Operations, Sorting, Searching & Counting, Static Typing with numpy.typing, Statistics & Histograms, Strings, Bytes and StringDType, Structured Arrays, The Absolute Basics of NumPy, The Array API Standard, Threads, Free-Threading and Performance, Type Promotion (NEP 50), Universal Functions (ufuncs), and What’s New in NumPy 2.1 to 2.5.
pandas
The main pandas 3.1 objects and idioms: selection, Copy-on-Write, dtypes, missing data, group by, reshaping, merging, time series, input and output, and migration notes from pandas 2.
For the full explanation, every option and additional examples, see the dedicated pages:
10 Minutes to pandas, Categorical Data in pandas, Charts with pandas, Coming from R & Spreadsheets, Coming from SQL, Concatenation, Copy-on-Write, CSV & Text Files, Data Types Overview, DataFrame, Duplicate Labels and Rows in pandas, Enhancing Performance, Essential Basic Functionality, Excel, FAQ and Gotchas, Group By: Split-Apply-Combine, HDF5 and Pickle, Index Objects, Indexing and Selecting, Installing pandas and Understanding Its Versions, JSON, HTML & XML, Melt, Stack & Explode in pandas, Merge & Join in pandas, Missing Data in pandas, MultiIndex, Nullable Integer, Float and Boolean Dtypes in pandas, Options & Settings, Parquet, Feather, ORC and Iceberg, pd.col, select and filter, Pivot & Pivot Tables in pandas, PyArrow-Backed Data, Resampling and Frequencies, Rolling, Expanding and EWM, Scaling to Large Datasets, Series, Sparse Data, SQL Databases, Table Styling, Text Data & the str Dtype in pandas, Time Deltas, Time Series and Dates, User-Defined Functions, and What’s New in 3.x and Migrating.
scikit-learn
The estimator API, pipelines and column transformers, splitting and cross-validation, metrics and scoring, hyperparameter search, estimator families, and the pitfalls of leakage and randomness in scikit-learn 1.9.
For the full explanation, every option and additional examples, see the dedicated pages:
Array API and GPU Support (Experimental), Choosing the Right Estimator in scikit-learn, Clustering, ColumnTransformer & Heterogeneous Data, Common Pitfalls: Leakage and Randomness, Cross-Validation & Splitters in scikit-learn, Dataset Loaders, Fetchers and Generators in scikit-learn, Decision Trees, Display Objects and Visualizations in scikit-learn, Encoding Categorical Features, Feature Extraction: Text, Dicts & Hashing, Feature Selection, FrozenEstimator, Gaussian Mixture Models, get_params, set_params and clone, Getting Started with scikit-learn, Glossary of Key Terms in scikit-learn, Gradient Boosting & HistGradientBoosting, Grid, Randomized & Halving Search in scikit-learn, Imputing Missing Values, Installing scikit-learn, Linear Models and Logistic Regression in scikit-learn, Manifold Learning, Metadata Routing, Metrics & Scoring, Model Persistence and Security in scikit-learn, Naive Bayes, Nearest Neighbors, Outlier & Novelty Detection, pandas & polars Output (set_output), PCA, TruncatedSVD & NMF, Performance and Parallelism in scikit-learn, Permutation Importance & Partial Dependence, Pipelines, Probability Calibration, Random Forests & Bagging, Scaling & Transforming Features, Support Vector Machines in scikit-learn, The scikit-learn Estimator API, Train/Test Split, Tuning the Decision Threshold in scikit-learn, Validation & Learning Curves in scikit-learn, Voting, Stacking & Multiclass, and What’s New in scikit-learn 1.6 to 1.9.