CLN: remove pandas/io/gbq.py and tests and replace with pandas-gbq
State: closed

closes #15347

- going to have to migrate the docs as well, but need some work on pandas-gbq side for this.
- should change the tests to check a bit more (a more comprehensive check)

Labels:

Comments:
cc @parthea 
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15484?src=pr&el=h1) Report
> Merging [#15484](https://codecov.io/gh/pandas-dev/pandas/pull/15484?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/fb7dc7dcbde1d81dea28b1b83e1c3bd171a7e73d?src=pr&el=desc) will **increase** coverage by `0.71%`.
> The diff coverage is `53.12%`.


```diff
@@            Coverage Diff             @@
##           master   #15484      +/-   ##
==========================================
+ Coverage   90.36%   91.07%   +0.71%     
==========================================
  Files         136      136              
  Lines       49553    49096     -457     
==========================================
- Hits        44780    44716      -64     
+ Misses       4773     4380     -393
```


| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/15484?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/util/print_versions.py](https://codecov.io/gh/pandas-dev/pandas/compare/fb7dc7dcbde1d81dea28b1b83e1c3bd171a7e73d...0fd8d069c263dd30dd2afbcb96f1bf96c32330db?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvcHJpbnRfdmVyc2lvbnMucHk=) | `15.71% <ø> (ø)` | :white_check_mark: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/compare/fb7dc7dcbde1d81dea28b1b83e1c3bd171a7e73d...0fd8d069c263dd30dd2afbcb96f1bf96c32330db?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `40% <36.36%> (+23.53%)` | :white_check_mark: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/compare/fb7dc7dcbde1d81dea28b1b83e1c3bd171a7e73d...0fd8d069c263dd30dd2afbcb96f1bf96c32330db?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.73% <60%> (-0.1%)` | :x: |
| [pandas/util/decorators.py](https://codecov.io/gh/pandas-dev/pandas/compare/fb7dc7dcbde1d81dea28b1b83e1c3bd171a7e73d...0fd8d069c263dd30dd2afbcb96f1bf96c32330db?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvZGVjb3JhdG9ycy5weQ==) | `67.32% <62.5%> (-1.28%)` | :x: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/compare/fb7dc7dcbde1d81dea28b1b83e1c3bd171a7e73d...0fd8d069c263dd30dd2afbcb96f1bf96c32330db?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `81.91% <0%> (-0.19%)` | :x: |
| [pandas/types/cast.py](https://codecov.io/gh/pandas-dev/pandas/compare/fb7dc7dcbde1d81dea28b1b83e1c3bd171a7e73d...0fd8d069c263dd30dd2afbcb96f1bf96c32330db?src=pr&el=tree#diff-cGFuZGFzL3R5cGVzL2Nhc3QucHk=) | `85.45% <0%> (+0.02%)` | :white_check_mark: |
| [pandas/core/common.py](https://codecov.io/gh/pandas-dev/pandas/compare/fb7dc7dcbde1d81dea28b1b83e1c3bd171a7e73d...0fd8d069c263dd30dd2afbcb96f1bf96c32330db?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvY29tbW9uLnB5) | `91.36% <0%> (+0.33%)` | :white_check_mark: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15484?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/15484?src=pr&el=footer). Last update [fb7dc7d...0fd8d06](https://codecov.io/gh/pandas-dev/pandas/compare/fb7dc7dcbde1d81dea28b1b83e1c3bd171a7e73d...0fd8d069c263dd30dd2afbcb96f1bf96c32330db?el=footer&src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
@jorisvandenbossche ya, i'll fiddle with the doc-strings a bit. The problem is I don't want to have it import ``pandas_gbq`` *always* on pandas import itself. (otherwise I would simply assign the functions).
Ah, yes, forgot that part .. Then it seems not that easy to append the docstrings.
docs are now up: http://pandas-gbq.readthedocs.io/en/latest/index.html#

going to edit pandas docs and fix other suggestions by @jorisvandenbossche 
updated
@jorisvandenbossche lmk if any further comments. FYI I also am going to remove the 2 issues from whatsnew about gbq (as they are doc-ed in the ``pandas-gbq``).
That's also a long-standing issue.  I don't expect this to be significantly worse than other things that already happen in Pandas.  Please don't consider my comment as a blocking issue.
I actually think this *should* work on serialization, as we do properly setup ``__name__``, ``__qualname__`` and ``__module__``. That said really not sure. Can always revisit if someone has an issue.