diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 1c6e23746352e..39c7582744601 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -131,7 +131,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.api.extensions.ExtensionArray.ndim \ pandas.api.extensions.ExtensionArray.shape \ pandas.api.extensions.ExtensionArray.tolist \ - pandas.DataFrame.to_gbq \ pandas.DataFrame.__dataframe__ RET=$(($RET + $?)) ; echo $MSG "DONE" diff --git a/pandas/core/frame.py b/pandas/core/frame.py index dc32842947a1a..71415f1f785f4 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -2104,6 +2104,25 @@ def to_gbq( -------- pandas_gbq.to_gbq : This function in the pandas-gbq library. read_gbq : Read a DataFrame from Google BigQuery. + + Examples + -------- + Example taken from `Google BigQuery documentation + `_ + + >>> project_id = "my-project" + >>> table_id = 'my_dataset.my_table' + >>> df = pd.DataFrame({ + ... "my_string": ["a", "b", "c"], + ... "my_int64": [1, 2, 3], + ... "my_float64": [4.0, 5.0, 6.0], + ... "my_bool1": [True, False, True], + ... "my_bool2": [False, True, False], + ... "my_dates": pd.date_range("now", periods=3), + ... } + ... ) + + >>> df.to_gbq(table_id, project_id=project_id) # doctest: +SKIP """ from pandas.io import gbq