Software and platforms
Machine learning with Python
A machine learning project in Python follows one workflow: load and explore data with pandas, split it properly, train a scikit-learn pipeline, check it with cross-validation, then save the model and serve predictions. Learning that sequence once lets you apply it to churn, pricing, fraud or any tabular prediction problem.
What people build with machine learning in Python
Predictions from tables with scikit-learn
Most business machine learning predicts a column in a table: churn, default risk, demand or fraud. scikit-learn gives one consistent interface for splitting data, preprocessing, training and cross-validation.
Real exampleScikit-learn: Machine Learning in PythonThe JMLR paper describes scikit-learn as a Python module integrating a wide range of machine learning algorithms for medium-scale supervised and unsupervised problems.
Gradient-boosted trees for strong tabular models
Boosted trees often give the best accuracy on structured data with mixed numeric and categorical columns. XGBoost, LightGBM and CatBoost all have Python APIs that work with scikit-learn pipelines.
Real exampleXGBoostThe XGBoost paper describes a scalable tree boosting system that is used widely by data scientists on machine learning challenges.
Forecasting time series
Forecasting models predict future values such as sales or traffic from past values, trends and seasonality. Python libraries handle holidays, missing data and uncertainty intervals.
Real exampleProphetProphet is a forecasting procedure in R and Python based on an additive model with yearly, weekly and daily seasonality plus holiday effects.
Deep learning for images, text and audio
Neural networks for vision, language and speech are almost always trained in Python. PyTorch is the most common framework, and pretrained models can be downloaded and fine-tuned.
Real examplePyTorchThe PyTorch paper describes an imperative, Pythonic deep learning library that supports hardware accelerators such as GPUs.
Working with pretrained language models
Classifying text, extracting entities and generating text usually starts from a pretrained transformer rather than a model trained from scratch.
Real exampleHugging Face TransformersThe Transformers paper describes an open-source library of Transformer architectures under one API, backed by a curated collection of pretrained models.
Can you learn machine learning with Python?
Yes, and Python is the most common place to start. Learn the language, then NumPy and pandas for data, the statistics and maths behind models, and then the scikit-learn workflow before moving to deep learning.
- The Python languageVariables, functions, loops, lists and dictionaries, plus reading files and installing packages in a project environment.Learn it in Python
- NumPy, pandas and plottingLoad a CSV, clean columns, group and join tables, and plot distributions before any model is trained.Learn it in Data Tools
- Statistics and maths for modelsDistributions, sampling, linear algebra and derivatives explain what training does and how much to trust a score.Learn it in Statistics
- The scikit-learn workflowTrain and compare models in a Pipeline with cross-validation and a baseline, then save the fitted pipeline.Learn it in Machine Learning
- Deep learning with PyTorchMove to neural networks for images, text and audio once the tabular workflow is routine.Learn it in Deep Learning
Moving into machine learning work with Python
If you already work in the field
If you already write Python as a developer or analyst, you have the language; add statistics, evaluation and the scikit-learn workflow. A realistic first move is one end-to-end project: a cleaned dataset, a pipeline that beats a baseline, and a small API that serves it.
If you come from data science or ML
If you learned machine learning in R, MATLAB or a GUI tool, the ideas carry over and the main work is the Python toolset: pandas, scikit-learn and PyTorch. Reproduce one project you have already done in Python to learn the idioms quickly.
Roles that do this workData scientistMachine learning engineerData analystApplied scientistMLOps engineer
Tools you will use
| Tool | What you use it for |
|---|---|
| uv | Create a project environment and pin exact package versions so the experiment reruns the same way. |
| Jupyter | Explore the data and try models interactively in notebooks before moving code into scripts. |
| pandas | Load CSV files, inspect missing values and distributions, and prepare the feature table and target. |
| scikit-learn | Split data, chain preprocessing and a model in a Pipeline, and evaluate it with cross-validation. |
| skops | Save a fitted scikit-learn pipeline in a format you can inspect for untrusted types before loading. |
| FastAPI | Wrap the saved pipeline in a small web API that validates inputs and returns predictions. |
Public data to practise on
- Adult / Census Income (UCI): Census records with numeric and categorical columns; predict whether a person's income is over 50K a year.
- Online Shoppers Purchasing Intention (UCI): Browsing-session features from an online shop; predict whether a session ends in a purchase.
Your first project
Download the Adult dataset, predict whether income exceeds 50K with a Pipeline of one-hot encoding and logistic regression, compare it with a DummyClassifier using 5-fold cross-validated ROC AUC, then save it with skops and serve it from a FastAPI endpoint.
Common questions
How long does it take to learn machine learning with Python?
It depends on your starting point and the time you have. Learning the language, data handling and the scikit-learn workflow in that order, with a small project at each stage, is quicker than starting with deep learning.
Which Python libraries are used for machine learning?
NumPy and pandas for data, matplotlib for plots, scikit-learn for classical models, XGBoost or LightGBM for boosted trees, and PyTorch for deep learning.
Do I need advanced maths to start?
No. You can train useful models with school-level maths. Linear algebra, calculus and probability become important when you want to understand, tune and debug models.
Should I learn scikit-learn or PyTorch first?
Start with scikit-learn. It teaches splitting, baselines and evaluation on small tables, which you then reuse when training neural networks in PyTorch.
Courses for these skills
- Python for AI and Machine LearningWrite functions and inspect exceptions while building a repeatable analysis.33 published lessons · all planned lessons open
- Data Tools: NumPy, pandas, Matplotlib and scikit-learnKeep datasets, joins and feature definitions reproducible.23 published lessons · all planned lessons open
- Practical Machine Learning in PythonConnect data splits and metrics to an actual decision.51 published lessons · more lessons in production
New to programming or maths? Start with Python, or follow the machine learning path in order. Published lessons are free to read; compare Free and Pro.