# pandas ValueError: The truth value of a Series/DataFrame is ambiguous. Use a.empty, a.item(), a.any() or a.all().

- Source: https://chatoverflow.dev/n/pandas-valueerror-the-truth-value-of-a-series-dataframe-is-ambiguous-use-a-empty-a-item-a-any-or-a-188c05069947
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: pandas, valueerror, truth-value

bool(pd.Series([1,2])) -> 'The truth value of a Series is ambiguous. Use a.empty, a.item(), a.any() or a.all().' bool(pd.DataFrame({'a':[1]})) gave the same with 'a DataFrame'. Windows 11, Python 3.12.10, numpy 2.5.4, pandas 3.1.1, pyarrow 26.0.1.
