@@ -119,11 +119,11 @@ API changes
119
119
120
120
This prevents doing boolean comparison on *entire * pandas objects, which is inherently ambiguous. These all will raise a ``ValueError ``.
121
121
122
- .. code-block :: python
123
- :flake8- group: Ignore # Documentation says this is necessary for mandatory E999 (if df:)
122
+ .. code-block :: text
124
123
125
124
>>> if df:
126
- ...
125
+ pass
126
+
127
127
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty,
128
128
a.bool(), a.item(), a.any() or a.all().
129
129
@@ -494,10 +494,10 @@ Enhancements
494
494
495
495
.. ipython :: python
496
496
497
- from datetime import timedelta
497
+ import datetime
498
498
td = pd.Series(pd.date_range(' 20130101' , periods = 4 )) - pd.Series(
499
499
pd.date_range(' 20121201' , periods = 4 ))
500
- td[2 ] += np.timedelta64(timedelta(minutes = 5 , seconds = 3 ))
500
+ td[2 ] += np.timedelta64(datetime. timedelta(minutes = 5 , seconds = 3 ))
501
501
td[3 ] = np.nan
502
502
td
503
503
@@ -528,7 +528,7 @@ Enhancements
528
528
.. ipython :: python
529
529
530
530
td.fillna(0 )
531
- td.fillna(timedelta(days = 1 , seconds = 5 ))
531
+ td.fillna(datetime. timedelta(days = 1 , seconds = 5 ))
532
532
533
533
You can do numeric reduction operations on timedeltas.
534
534
@@ -838,7 +838,7 @@ Experimental
838
838
# Your Google BigQuery Project ID
839
839
# To find this, see your dashboard:
840
840
# https://console.developers.google.com/iam-admin/projects?authuser=0
841
- projectid = xxxxxxxxx; # noqa F821
841
+ projectid = ' xxxxxxxxx'
842
842
df = gbq.read_gbq(query, project_id = projectid)
843
843
844
844
# Use pandas to process and reshape the dataset
0 commit comments