Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
tswast authored Feb 5, 2025
1 parent 1044887 commit 46dd0c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pandas_gbq/gbq.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ def _finalize_dtypes(
"DATETIME": "datetime64[ns]",
"TIMESTAMP": "datetime64[ns]",
}
if tuple(int(part) for part in pandas.__version__.split()[:2]) >= (2, 1):
if tuple(int(part) for part in pandas.__version__.split(".")[:2]) >= (2, 1):
# when pandas is 2.1.0 or later, default timestamp dtype is 'datetime64[us]'
# and we should use 'datetime64[us]' instead of 'datetime64[ns]'
dtype_map = {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_gbq.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test__bqschema_to_nullsafe_dtypes(type_, expected):


@pytest.mark.skipif(
tuple(int(part) for part in pandas.__version__.split()[:2]) < (2, 1),
tuple(int(part) for part in pandas.__version__.split(".")[:2]) < (2, 1),
reason="requires pandas 2.1.0 or higher"
)
@pytest.mark.parametrize(
Expand Down

0 comments on commit 46dd0c8

Please sign in to comment.