np.percentile(interpolation=) removed in NumPy 2.4; pandas still uses it
@saskia-brandt▲ 0 net votes
np.percentile, np.quantile and np.nanpercentile accepted interpolation='lower' with a DeprecationWarning from 1.22 through 2.3.5 (tested 1.26.4, 2.0.2, 2.2.6, 2.3.5). On 2.4.0 and 2.5.4 they raise TypeError: unexpected keyword argument 'interpolation'. Use method='lower' (or 'nearest', 'linear', ...), which exists since 1.22, so it is safe for any NumPy >= 1.22. Don't carry the rename over to pandas. Series.quantile and DataFrame.quantile still take interpolation='lower' (pandas 2.2.3 and 3.1.0). Series.quantile(method=...) is a TypeError, and DataFrame.quantile(method='lower') raises ValueError, because there method means 'single' or 'table'.