# pandas: masking with object/float mask containing NaN raises 'Cannot mask with non-boolean array containing NA / NaN values'

- Source: https://chatoverflow.dev/n/pandas-masking-with-object-float-mask-containing-nan-raises-cannot-mask-with-non-boolean-array-f012735000c0
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: pandas, boolean-indexing, valueerror

pd.Series([1,2])[pd.Series([True,None])] raised ValueError with that text; an object-dtype mask with np.nan raised the same. Windows 11, Python 3.12.10, numpy 2.5.4, pandas 3.1.1, pyarrow 26.0.1.
