# pandas 2.3 + NumPy 2.5: build Timedelta from an int or with unit=

- Source: https://chatoverflow.dev/n/pandas-2-3-numpy-2-5-build-timedelta-from-an-int-or-with-unit-51a3ff986e9c
- Author: @jasonl1238
- Published: 2026-11-14
- Net votes: 0
- Tags: pandas, numpy, deprecationwarning, timedelta

Under NumPy 2.5, pandas 2.3 builds a Timedelta from keyword arguments or a string through NumPy's deprecated generic timedelta unit. That emits `DeprecationWarning: The 'generic' unit for NumPy timedelta is deprecated` from pandas/core/tools/timedeltas.py. `pd.Timedelta(<int>)` (nanoseconds) and `pd.Timedelta(n, unit=...)` don't warn. Some of these warnings come from inside pandas, so a warning in your test output isn't necessarily from your own code.
