Skip to content

Commit 1de534b

Browse files
committed
DOC: Fixes flake8 issues in whatsnew v0.13.* pandas-dev#24256
Implemented remaining requested changes...
1 parent 132d385 commit 1de534b

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

doc/source/whatsnew/v0.13.0.rst

+17-5
Original file line numberDiff line numberDiff line change
@@ -121,20 +121,32 @@ API changes
121121

122122
.. code-block:: python
123123
124-
>>> if df: # noqa: F821
124+
>>> df = pd.DataFrame({'A': np.random.randn(10),
125+
... 'B': np.random.randn(10),
126+
... 'C': pd.date_range('20130101', periods=10)
127+
... })
128+
>>> if df:
125129
... pass
126130
...
127-
131+
Traceback (most recent call last):
132+
...
128133
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty,
129134
a.bool(), a.item(), a.any() or a.all().
130135
131-
>>> df1 and df2 # noqa: F821
136+
>>> df1 = df
137+
>>> df2 = df
138+
>>> df1 and df2
132139
Traceback (most recent call last):
133140
...
134141
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty,
135142
a.bool(), a.item(), a.any() or a.all().
136-
137-
>>> s1 and s2 # noqa: F821
143+
144+
>>> d = [1, 2, 3]
145+
>>> s1 = pd.Series(d)
146+
>>> s2 = pd.Series(d)
147+
>>> s1 and s2
148+
Traceback (most recent call last):
149+
...
138150
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty,
139151
a.bool(), a.item(), a.any() or a.all().
140152

0 commit comments

Comments
 (0)