Skip to content

Commit 89be220

Browse files
committed
Update min pandas to 0.23.0
This is the first version that passing a dtype of pandas.api.types.DatetimeTZDtype(tz="UTC") to the Series constructor actually works. I get "TypeError: data type not understood" in lower versions.
1 parent c76dbba commit 89be220

File tree

7 files changed

+17
-11
lines changed

7 files changed

+17
-11
lines changed

.circleci/config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ jobs:
4545
- run: nox -s lint
4646

4747
# Conda
48-
"conda-3.6-0.21.1":
48+
"conda-3.6-0.23.0":
4949
docker:
5050
- image: continuumio/miniconda3
5151
environment:
5252
PYTHON: "3.6"
53-
PANDAS: "0.21.1"
53+
PANDAS: "0.23.0"
5454
steps:
5555
- checkout
5656
- run: ci/config_auth.sh
@@ -65,4 +65,4 @@ workflows:
6565
- "pip-3.6"
6666
- "pip-3.7"
6767
- lint
68-
- "conda-3.6-0.21.1"
68+
- "conda-3.6-0.23.0"

ci/requirements-2.7.pip

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mock
2-
pandas==0.20.0
2+
pandas==0.23.0
33
google-auth==1.4.1
44
google-auth-oauthlib==0.0.1
55
google-cloud-bigquery==1.9.0

ci/requirements-3.5.pip

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pandas==0.20.0
1+
pandas==0.23.0
22
google-auth==1.4.1
33
google-auth-oauthlib==0.0.1
44
google-cloud-bigquery==1.9.0
File renamed without changes.

docs/source/changelog.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Dependency updates
1111

1212
- Update the minimum version of ``google-cloud-bigquery`` to 1.9.0.
1313
(:issue:`247`)
14-
- Update the minimum version of ``pandas`` to 0.20.0. (:issue:`263`)
14+
- Update the minimum version of ``pandas`` to 0.23.0. (:issue:`263`)
1515

1616
Internal changes
1717
~~~~~~~~~~~~~~~~

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def readme():
1818

1919
INSTALL_REQUIRES = [
2020
"setuptools",
21-
"pandas>=0.20.0",
21+
"pandas>=0.23.0",
2222
"pydata-google-auth",
2323
"google-auth",
2424
"google-auth-oauthlib",

tests/system/test_gbq.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def test_should_properly_handle_timestamp_unix_epoch(self, project_id):
314314
df,
315315
DataFrame(
316316
{"unix_epoch": ["1970-01-01T00:00:00.000000Z"]},
317-
dtype="datetime64[ns]",
317+
dtype=pandas.api.types.DatetimeTZDtype(tz="UTC"),
318318
),
319319
)
320320

@@ -330,7 +330,7 @@ def test_should_properly_handle_arbitrary_timestamp(self, project_id):
330330
df,
331331
DataFrame(
332332
{"valid_timestamp": ["2004-09-15T05:00:00.000000Z"]},
333-
dtype="datetime64[ns]",
333+
dtype=pandas.api.types.DatetimeTZDtype(tz="UTC"),
334334
),
335335
)
336336

@@ -403,7 +403,11 @@ def test_should_properly_handle_null_timestamp(self, project_id):
403403
dialect="legacy",
404404
)
405405
tm.assert_frame_equal(
406-
df, DataFrame({"null_timestamp": [NaT]}, dtype="datetime64[ns]")
406+
df,
407+
DataFrame(
408+
{"null_timestamp": [NaT]},
409+
dtype=pandas.api.types.DatetimeTZDtype(tz="UTC"),
410+
),
407411
)
408412

409413
def test_should_properly_handle_null_datetime(self, project_id):
@@ -589,7 +593,9 @@ def test_zero_rows(self, project_id):
589593
"title": pandas.Series([], dtype=object),
590594
"id": pandas.Series([], dtype=np.dtype(int)),
591595
"is_bot": pandas.Series([], dtype=np.dtype(bool)),
592-
"ts": pandas.Series([], dtype="datetime64[ns]"),
596+
"ts": pandas.Series(
597+
[], dtype=pandas.api.types.DatetimeTZDtype(tz="UTC")
598+
),
593599
}
594600
expected_result = DataFrame(
595601
empty_columns, columns=["title", "id", "is_bot", "ts"]

0 commit comments

Comments
 (0)