File tree 1 file changed +17
-5
lines changed
1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -121,20 +121,32 @@ API changes
121
121
122
122
.. code-block :: python
123
123
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:
125
129
... pass
126
130
...
127
-
131
+ Traceback (most recent call last):
132
+ ...
128
133
ValueError : The truth value of a DataFrame is ambiguous. Use a.empty,
129
134
a.bool(), a.item(), a.any() or a.all().
130
135
131
- >> > df1 and df2 # noqa: F821
136
+ >> > df1 = df
137
+ >> > df2 = df
138
+ >> > df1 and df2
132
139
Traceback (most recent call last):
133
140
...
134
141
ValueError : The truth value of a DataFrame is ambiguous. Use a.empty,
135
142
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
+ ...
138
150
ValueError : The truth value of a DataFrame is ambiguous. Use a.empty,
139
151
a.bool(), a.item(), a.any() or a.all().
140
152
You can’t perform that action at this time.
0 commit comments