diff --git a/doc/source/whatsnew/v1.0.0.rst b/doc/source/whatsnew/v1.0.0.rst index 0f0d86e2710615..cd11a15e74b1f9 100755 --- a/doc/source/whatsnew/v1.0.0.rst +++ b/doc/source/whatsnew/v1.0.0.rst @@ -535,6 +535,7 @@ or ``matplotlib.Axes.plot``. See :ref:`plotting.formatters` for more. - :meth:`Series.plot` no longer accepts positional arguments, pass keyword arguments instead (:issue:`30003`) - :meth:`DataFrame.hist` and :meth:`Series.hist` no longer allows ``figsize="default"``, specify figure size by passinig a tuple instead (:issue:`30003`) - Floordiv of integer-dtyped array by :class:`Timedelta` now raises ``TypeError`` (:issue:`21036`) +- :class:`TimedeltaIndex` and :class:`DatetimeIndex` no longer accept non-nanosecond dtype strings like "timedelta64" or "datetime64", use "timedelta64[ns]" and "datetime64[ns]" instead (:issue:`24806`) - :func:`pandas.api.types.infer_dtype` argument ``skipna`` defaults to ``True`` instead of ``False`` (:issue:`24050`) - Removed the previously deprecated :attr:`Series.ix` and :attr:`DataFrame.ix` (:issue:`26438`) - Removed the previously deprecated :meth:`Index.summary` (:issue:`18217`) @@ -634,6 +635,7 @@ or ``matplotlib.Axes.plot``. See :ref:`plotting.formatters` for more. - Removed the previously deprecated keyword "data" from :func:`andrews_curves`, use "frame" instead (:issue:`6956`) - Removed the previously deprecated keyword "data" from :func:`parallel_coordinates`, use "frame" instead (:issue:`6956`) - Removed the previously deprecated keyword "colors" from :func:`parallel_coordinates`, use "color" instead (:issue:`6956`) +- Removed the previously deprecated keywords "verbose" and "private_key" from :func:`read_gbq` (:issue:`30200`) - .. _whatsnew_1000.performance: diff --git a/pandas/core/frame.py b/pandas/core/frame.py index fa85c54eb42fae..55dd91a8129b53 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -1433,8 +1433,6 @@ def to_gbq( location=None, progress_bar=True, credentials=None, - verbose=None, - private_key=None, ): """ Write a DataFrame to a Google BigQuery table. @@ -1509,21 +1507,6 @@ def to_gbq( *New in version 0.8.0 of pandas-gbq*. .. versionadded:: 0.24.0 - verbose : bool, deprecated - Deprecated in pandas-gbq version 0.4.0. Use the `logging module - to adjust verbosity instead - `__. - private_key : str, deprecated - Deprecated in pandas-gbq version 0.8.0. Use the ``credentials`` - parameter and - :func:`google.oauth2.service_account.Credentials.from_service_account_info` - or - :func:`google.oauth2.service_account.Credentials.from_service_account_file` - instead. - - Service account private key in JSON format. Can be file path - or string contents. This is useful for remote server - authentication (eg. Jupyter/IPython notebook on remote host). See Also -------- @@ -1544,8 +1527,6 @@ def to_gbq( location=location, progress_bar=progress_bar, credentials=credentials, - verbose=verbose, - private_key=private_key, ) @classmethod diff --git a/pandas/io/gbq.py b/pandas/io/gbq.py index 4557e1cead7a2c..8a4a72021eb438 100644 --- a/pandas/io/gbq.py +++ b/pandas/io/gbq.py @@ -120,21 +120,6 @@ def read_gbq( ``fastavro`` packages. .. versionadded:: 0.25.0 - private_key : str, deprecated - Deprecated in pandas-gbq version 0.8.0. Use the ``credentials`` - parameter and - :func:`google.oauth2.service_account.Credentials.from_service_account_info` - or - :func:`google.oauth2.service_account.Credentials.from_service_account_file` - instead. - - Service account private key in JSON format. Can be file path - or string contents. This is useful for remote server - authentication (eg. Jupyter/IPython notebook on remote host). - verbose : None, deprecated - Deprecated in pandas-gbq version 0.4.0. Use the `logging module to - adjust verbosity instead - `__. progress_bar_type : Optional, str If set, use the `tqdm `__ library to display a progress bar while the data downloads. Install the @@ -182,14 +167,6 @@ def read_gbq( kwargs["progress_bar_type"] = progress_bar_type # END: new kwargs - # START: deprecated kwargs. Don't populate unless explicitly set. - if verbose is not None: - kwargs["verbose"] = verbose - - if private_key is not None: - kwargs["private_key"] = private_key - # END: deprecated kwargs - return pandas_gbq.read_gbq( query, project_id=project_id, diff --git a/pandas/tests/io/test_gbq.py b/pandas/tests/io/test_gbq.py index 75c80bb0b80255..ab27ea7098b08b 100644 --- a/pandas/tests/io/test_gbq.py +++ b/pandas/tests/io/test_gbq.py @@ -89,21 +89,6 @@ def make_mixed_dataframe_v2(test_size): ) -def test_read_gbq_with_deprecated_kwargs(monkeypatch): - captured_kwargs = {} - - def mock_read_gbq(sql, **kwargs): - captured_kwargs.update(kwargs) - return DataFrame([[1.0]]) - - monkeypatch.setattr("pandas_gbq.read_gbq", mock_read_gbq) - private_key = object() - pd.read_gbq("SELECT 1", verbose=True, private_key=private_key) - - assert captured_kwargs["verbose"] - assert captured_kwargs["private_key"] is private_key - - def test_read_gbq_without_deprecated_kwargs(monkeypatch): captured_kwargs = {}