File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1474,6 +1474,10 @@ def bool(self) -> bool_t:
1474
1474
"""
1475
1475
Return the bool of a single element Series or DataFrame.
1476
1476
1477
+ .. deprecated:: 2.1.0
1478
+
1479
+ bool is deprecated and will be removed in future version of pandas
1480
+
1477
1481
This must be a boolean scalar value, either True or False. It will raise a
1478
1482
ValueError if the Series or DataFrame does not have exactly 1 element, or that
1479
1483
element is not boolean (integer values 0 and 1 will also raise an exception).
@@ -1493,14 +1497,14 @@ def bool(self) -> bool_t:
1493
1497
--------
1494
1498
The method will only work for single element objects with a boolean value:
1495
1499
1496
- >>> pd.Series([True]).bool()
1500
+ >>> pd.Series([True]).bool() # doctest: +SKIP
1497
1501
True
1498
- >>> pd.Series([False]).bool()
1502
+ >>> pd.Series([False]).bool() # doctest: +SKIP
1499
1503
False
1500
1504
1501
- >>> pd.DataFrame({'col': [True]}).bool()
1505
+ >>> pd.DataFrame({'col': [True]}).bool() # doctest: +SKIP
1502
1506
True
1503
- >>> pd.DataFrame({'col': [False]}).bool()
1507
+ >>> pd.DataFrame({'col': [False]}).bool() # doctest: +SKIP
1504
1508
False
1505
1509
"""
1506
1510
You can’t perform that action at this time.
0 commit comments