
pandas 3.1.0 shipped on October 22, 2026. It's a smaller release than 3.0 — which introduced copy-on-write as the default behavior — but it adds a new expression API, starts actively warning you off a pattern a lot of real pipelines still use, and quietly raises the minimum NumPy version you need underneath it. None of these are breaking on their own, but each one is the kind of thing that turns into a surprise CI failure if you're not watching for it.
What's new in pandas 3.1.0
- A new
DataFrame.select()method paired with apd.col()expression helper, for building multiple derived columns in a single call. inplace=Truenow raises aPandas4Warningon several mutating methods — a heads-up that it's being phased out ahead of a future pandas 4.0.- The minimum supported NumPy version is now 2.0.2 (2.3.3 if you're on Python 3.14).
The new DataFrame.select() / pd.col() expression API
Before this release, building several derived columns at once usually meant chaining .assign() calls or writing out df["x"] = ... assignments one at a time. select() with pd.col() lets you describe each output column as an expression over existing columns, all in one call:
import pandas as pd
from pandas import col
df = pd.DataFrame({
"order_id": [1, 2, 3, 4],
"price": [19.99, 42.50, 7.25, 100.0],
"quantity": [2, 1, 5, 1],
})
result = df.select(
order_id=col("order_id"),
total=col("price") * col("quantity"),
is_bulk_order=col("quantity") > 3,
)
print(result)
# order_id total is_bulk_order
# 0 1 39.98 False
# 1 2 42.50 False
# 2 3 36.25 True
# 3 4 100.00 FalseThe win isn't just shorter code. Every output column is defined independently as its own expression, so pandas can evaluate them without you having to worry about column-ordering side effects from a chain of .assign() calls stepping on each other.
inplace=True is on its way out
This is the one most existing codebases will actually hit. Code like this still runs in 3.1.0 — but now it raises a warning instead of running silently:
import pandas as pd
import warnings
df = pd.DataFrame({"a": [1, 2, None, 4]})
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
df.fillna(0, inplace=True)
if w:
print(w[0].category.__name__, "-", w[0].message)
# Pandas4Warning - inplace=True is deprecated and will be removed in a future version.
# Assign the result back to a variable instead.The rewrite that avoids the warning — and that will keep working once inplace=True is actually removed — is to stop mutating and just reassign:
df = df.fillna(0)This fits the direction pandas has been moving since 3.0's copy-on-write default: operations increasingly return new objects rather than mutating in place, and inplace=True was always somewhat at odds with that model. If your codebase leans on inplace=True across fillna, replace, sort_values, or similar methods, expect your test suite to get noisy on this upgrade — in a good way, since it's pointing at exactly the lines that need the rewrite.
A quick way to surface every call site at once, before you even touch the pandas version:
grep -rn "inplace=True" --include="*.py" .The NumPy floor just moved
pandas 3.1.0 raises its minimum supported NumPy version to 2.0.2 — or 2.3.3 if you're running Python 3.14. If your environment is pinned to an older NumPy for an unrelated reason, this is the release where that finally breaks the install, not a vague future warning.
Check what you're actually running before you touch the pandas pin:
python -c "import numpy; print(numpy.__version__)"
pip show numpy | grep VersionAnd pin accordingly in requirements.txt or pyproject.toml so the next install doesn't silently resolve to something older than pandas 3.1.0 will accept:
numpy>=2.0.2 ; python_version < "3.14"
numpy>=2.3.3 ; python_version >= "3.14"Migration checklist coming off pandas 3.0
- Grep your codebase for
inplace=Trueand rewrite each call site to reassign instead. - Run your test suite with warnings promoted to errors (
-W error::FutureWarning, or thePandas4Warningequivalent once you confirm its name in the changelog) to catch call sites your grep missed. - Check your installed NumPy version against the new floor, and update your dependency pins before you bump pandas.
- If you're currently chaining multiple
.assign()calls to build derived columns, look at whetherselect()withpd.col()expresses the same logic more directly.
None of this is a hard break if you upgrade deliberately. It is exactly the kind of thing that breaks a CI pipeline two months from now if you upgrade pandas as a transitive dependency bump and never look at the changelog.

Experienced DevOps Engineer proficient in Python, Docker, Kubernetes, CI/CD, and cloud technologies. Specialized in automating processes and building scalable infrastructure for seamless development and deployment.


