On this page
- Environments: uv has changed the experience
- Data frames: pandas, Polars and DuckDB
- Free-threaded Python
- Machine learning: scikit-learn and gradient boosting
- Deep learning: PyTorch leads
- Working with language models from Python
- Notebooks and AI coding assistants
- A starter stack for 2027
- Habits that matter more than tools
- Frequently asked questions

Which Python tools should data scientists use in 2027?
A modern 2027 stack is uv for environments, pandas for familiar analysis, Polars and DuckDB for fast work on large data, scikit-learn for classic machine learning, PyTorch for deep learning, and notebooks plus an AI coding assistant for exploration. Python 3.14 officially supports a free-threaded build, which will gradually speed up parallel workloads as libraries catch up.
Key takeaways
- Polars and DuckDB handle tens of millions of rows on a laptop, often much faster than classic pandas code.
- uv has made Python environment management fast and reproducible.
- scikit-learn remains the workhorse for tabular machine learning; gradient boosting still wins most tabular problems.
- AI coding assistants speed up routine work, but you must understand and test the code they write.
I learned data science the way many people did: pandas for everything, a virtual environment that broke every few months, and a laptop fan that sounded like a jet engine whenever a dataset passed a few million rows. Python's data ecosystem in 2027 is a much more comfortable place. The tools are faster, the environments are easier and AI assistants handle a lot of the boilerplate.
This is the toolkit I recommend to clients and new team members in 2027, with honest notes on when each piece is worth using. If you want the basics first, our existing articles on Python for machine learning and NumPy and pandas cover the foundations.
Environments: uv has changed the experience
Managing Python environments used to be one of the most frustrating parts of data work. uv, a package and project manager from Astral written in Rust, has changed that for many teams. It creates environments and installs packages very quickly, locks dependencies so a project can be rebuilt exactly, and can even install Python versions itself.
For data teams the practical benefit is reproducibility. A project that includes its lock file can be set up identically on a colleague's laptop, a server or a CI pipeline in seconds. If your team still shares instructions like "install these packages and hope", moving to uv is one of the cheapest improvements you can make.
Data frames: pandas, Polars and DuckDB
pandas remains the most widely used data frame library, and the ecosystem assumes it. Recent versions have moved towards Copy-on-Write behaviour and Apache Arrow-backed data types, which reduce memory use and surprising bugs. For data that fits comfortably in memory and code that others will maintain, pandas is still a sensible default.
Polars is a newer data frame library, also written in Rust, that reached version 1.0 in 2024. It uses all your CPU cores, has a lazy query engine that optimises whole pipelines before running them, and is often many times faster than equivalent pandas code on larger data. Its expression-based API takes a little getting used to, but it encourages cleaner code.
DuckDB is an in-process analytical database, also at version 1.0 since 2024. You can query Parquet, CSV and JSON files, or pandas and Polars data frames, with SQL directly from Python, with no server to set up. For analysts who think in SQL, it is a revelation.
In practice I use all three: DuckDB or Polars to crunch large raw files down to a manageable size, then pandas for the final analysis and plotting where libraries expect it. Our data analytics trends for 2027 explains how these lighter engines are reducing cloud costs.
Free-threaded Python
For decades, Python's Global Interpreter Lock (GIL) has prevented threads from running Python code truly in parallel. Python 3.13 introduced an experimental free-threaded build, and Python 3.14, released in October 2025, made the free-threaded build officially supported.
For data scientists the impact will be gradual. Many heavy libraries already release the GIL internally, and others need updates to be safe without it. Over 2027 and 2028, expect more libraries to support free-threading, and more parallel workloads, such as feature engineering and data loading, to speed up without switching to multiprocessing.
Machine learning: scikit-learn and gradient boosting
For tabular data, which is most business data, scikit-learn remains the workhorse: consistent APIs for preprocessing, models, pipelines and evaluation. Gradient boosting libraries (XGBoost, LightGBM, CatBoost and scikit-learn's own histogram-based gradient boosting) still win most tabular prediction problems, from churn to demand forecasting to credit risk.
Deep learning rarely beats well-tuned gradient boosting on ordinary tables. Save it for images, text, audio and very large datasets. Our scikit-learn article goes deeper.
Deep learning: PyTorch leads
PyTorch has become the dominant framework for deep learning research and much of industry, and it underpins most of the open-source AI ecosystem, including Hugging Face's libraries. TensorFlow and Keras remain in use, especially in existing production systems, and Keras 3 can run on several backends. If you are starting fresh in 2027, PyTorch is the safer bet. See our PyTorch and TensorFlow guides.
Working with language models from Python
Most data scientists now work with language models as well as classic models. The essentials: the official SDKs from model providers, Hugging Face Transformers for open models, a way to run models locally (such as Ollama), and libraries for evaluation and tracing. Keep it simple; many projects do not need a heavyweight framework, and a few well-tested functions are easier to maintain.
Notebooks and AI coding assistants
Jupyter notebooks remain the default for exploration, alongside newer reactive notebooks such as marimo, which store notebooks as plain Python files and keep cells consistent automatically. VS Code and other editors integrate notebooks well.
AI coding assistants are now part of most data scientists' daily work. They are excellent at boilerplate, plotting code, regular expressions, explaining unfamiliar libraries and converting between pandas and Polars. They are less reliable on statistics, business logic and edge cases. My rule is simple: never run AI-written code on important data without reading it, and always test it on a small sample where you know the right answer.
A starter stack for 2027
| Need | Recommended tool |
|---|---|
| Environments and packages | uv |
| Familiar data analysis | pandas |
| Large or fast data processing | Polars, DuckDB |
| Classic machine learning | scikit-learn, LightGBM or XGBoost |
| Deep learning | PyTorch |
| Visualisation | matplotlib, seaborn, Plotly |
| Exploration | Jupyter or marimo, with an AI assistant |
| Experiment tracking | MLflow |
Habits that matter more than tools
The best data scientists I know are not distinguished by their tools but by their habits. They check data before analysing it. They write small functions instead of thousand-line notebooks. They keep code in version control. They test assumptions and validate models on data the model has not seen. They explain results in plain language.
Those habits will outlast every library in this article. If you would like help building data science capability in your team, see our custom ML models service or our machine learning guide.
Frequently asked questions
Should I learn pandas or Polars in 2027?
Learn pandas first if you are starting out, because it is everywhere and most tutorials and libraries assume it. Add Polars when you work with larger data or care about speed. Many teams use both, converting between them as needed.
What is DuckDB used for?
DuckDB is an in-process analytical database. You can run fast SQL queries directly on CSV, Parquet and other files, or on pandas and Polars data frames, without setting up a server. It is excellent for exploration and local analytics.
What is uv?
A very fast Python package and project manager written in Rust. It replaces several older tools for creating environments, installing packages and locking dependencies, which makes projects easier to reproduce.
Is Python still the best language for data science?
Yes, for most work. R remains strong in statistics and some research fields, and SQL is essential for data work, but Python has the broadest ecosystem for data, machine learning and AI.
Do I still need to learn to code if AI writes code?
Yes. AI assistants write code quickly, but they also make mistakes that only someone who understands the code will catch. Knowing Python well makes you far more effective with AI, not less.
Sources and further reading
- Python 3.14 release notes: free-threaded Python (Python Software Foundation)
- Polars (Polars)
- DuckDB (DuckDB Foundation)
- uv documentation (Astral)
- scikit-learn (scikit-learn developers)
- PyTorch (PyTorch Foundation)


