Skip to content

Commit e75eacb

Browse files
committed
CLN: remove pandas/io/gbq.py and tests and replace with pandas-gbq
closes #15347
1 parent b94186d commit e75eacb

11 files changed

+89
-2399
lines changed

ci/requirements-2.7.pip

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
blosc
2-
httplib2
3-
google-api-python-client==1.2
4-
python-gflags==2.0
5-
oauth2client==1.5.0
2+
pandas-gbq
63
pathlib
74
backports.lzma
85
py

ci/requirements-3.4.pip

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
python-dateutil==2.2
22
blosc
3-
httplib2
4-
google-api-python-client
5-
oauth2client

ci/requirements-3.4_SLOW.pip

-3
This file was deleted.

ci/requirements-3.5.pip

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
xarray==0.9.1
2+
pandas-gbq

doc/source/io.rst

+7
Original file line numberDiff line numberDiff line change
@@ -4652,6 +4652,13 @@ And then issue the following queries:
46524652
Google BigQuery
46534653
---------------
46544654

4655+
.. warning::
4656+
4657+
Starting in 0.20.0, pandas has split off Google BigQuery support into the
4658+
separate package ``pandas-gbq``. You can ``pip install pandas-gbq`` to get it.
4659+
4660+
Documentation is now hosted `here <https://pandas-gbq.readthedocs.io/>`__
4661+
46554662
.. versionadded:: 0.13.0
46564663

46574664
The :mod:`pandas.io.gbq` module provides a wrapper for Google's BigQuery

doc/source/whatsnew/v0.20.0.txt

+9
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,15 @@ New Behavior:
360360
In [5]: df['a']['2011-12-31 23:59:59']
361361
Out[5]: 1
362362

363+
.. _whatsnew_0200.api_breaking.gbq:
364+
365+
Pandas Google BigQuery support has moved
366+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
367+
368+
pandas has split off Google BigQuery support into a separate package ``pandas-gbq``. You can ``pip install pandas-gbq`` to get it.
369+
The functionaility of ``pd.read_gbq()`` and ``.to_gbq()`` remains the same with the currently released version of ``pandas-gbq=0.1.2``. (:issue:`15347`)
370+
Documentation is now hosted `here <https://pandas-gbq.readthedocs.io/>`__
371+
363372
.. _whatsnew_0200.api_breaking.memory_usage:
364373

365374
Memory Usage for Index is more Accurate

pandas/core/frame.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@
7777
OrderedDict, raise_with_traceback)
7878
from pandas import compat
7979
from pandas.compat.numpy import function as nv
80-
from pandas.util.decorators import deprecate_kwarg, Appender, Substitution
80+
from pandas.util.decorators import (deprecate_kwarg, Appender,
81+
Substitution, docstring_wrapper)
8182
from pandas.util.validators import validate_bool_kwarg
8283

8384
from pandas.tseries.period import PeriodIndex
@@ -903,6 +904,7 @@ def to_dict(self, orient='dict'):
903904
else:
904905
raise ValueError("orient '%s' not understood" % orient)
905906

907+
@docstring_wrapper(lambda: pandas.io.gbq._try_import().to_gbq.__doc__)
906908
def to_gbq(self, destination_table, project_id, chunksize=10000,
907909
verbose=True, reauth=False, if_exists='fail', private_key=None):
908910
"""Write a DataFrame to a Google BigQuery table.

0 commit comments

Comments
 (0)