GbqConnector should be able to fetch default credentials on Google Compute Engine
- [x] closes #13577
- [x] passed 1 new test
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

in the future pls don't open new PR's for the same issue, just push to the old one. it causes extra work.
 ## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13608?src=pr) is 85.25% (diff: 3.57%)

> Merging [#13608](https://codecov.io/gh/pydata/pandas/pull/13608?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will decrease coverage by **0.05%**

``` diff
@@             master     #13608   diff @@
==========================================
  Files           139        139          
  Lines         50143      50272   +129   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          42777      42857    +80   
- Misses         7366       7415    +49   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [7e15923...a65b3f1](https://codecov.io/gh/pydata/pandas/compare/7e15923d908a42008fb7fecde58be626277fd82e...a65b3f170582343fcb7fdede77f1c4136702e161?src=pr)
 @jreback Got it. Apologies for that! This was my first contribution - the last PR got a bit messy. Will be careful next time. Thanks!
 no prob. It just keeps a better chain to have a single PR.
 @jreback the new method that I added has some googleapiclient imports which cause the test to not completely capture the lines of codes. Can someone please have a look and close or suggest further actions.

Thanks,
Haseeb
 @jreback I will incorporate all the changes you suggested. Thank you for your time!

p.s. things like nested try/catch; staticmethod; etc. I implemented these to trick codecov and nosetests to cover/pass test for the new method. I will revert these changes.
 @jreback incorporated the suggested changes. Thanks! :)
 Hi @jreback I was wondering - did you have a look at my last changes? Is the pull request eligible to be merged? Thanks! :)
 needs tests
 @jreback I have written this test "test_get_application_default_credentials_should_not_throw_error" which should call (cover) the new method I've added. The "test environment" is probably skipping (TestGBQConnectorIntegration.setUp) this test because "project_id" is not set. I am guessing - even if I add more tests they will be skipped. As you can see from the coverage report - not even the first line of the method is covered - 
https://codecov.io/gh/pydata/pandas/compare/5701c69369264f3aa6f571384602ceec1133dabc...d4c7e3d33eca9d88a308802c8921addec40b77b9

If I am not understanding this correctly - could you please guide me how to solve this. Thank you for your time!
 Hi @jreback, do you think the pull request is fine now. The second test (test_get_application_default_credentials_returns_credentials) will only be executed (not skipped) if a google account is authenticated (for gcloud) on the environment.
 cc @parthea can you give this a run.
 Output from local run using oauth2client==1.2.

37 tests skipped. Need to move `from oauth2client.client import GoogleCredentials` inside of try except since `oauth2client==1.2` doesn't have `client.GoogleCredentials`

```
tony@tonypc:~/pandas-master/pandas/io/tests$ nosetests test_gbq.py -vtest_import_google_api_python_client (pandas.io.tests.test_gbq.GBQUnitTests) ... SKIP: Could not import Google API Client.
test_read_gbq_with_corrupted_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... SKIP: Could not import Google API Client.
test_read_gbq_with_empty_private_key_file_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... SKIP: Could not import Google API Client.
test_read_gbq_with_empty_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... SKIP: Could not import Google API Client.
test_read_gbq_with_invalid_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... SKIP: Could not import Google API Client.
test_read_gbq_with_no_project_id_given_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... SKIP: Could not import Google API Client.
test_read_gbq_with_private_key_json_wrong_types_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... SKIP: Could not import Google API Client.
test_should_return_bigquery_booleans_as_python_booleans (pandas.io.tests.test_gbq.GBQUnitTests) ... SKIP: Could not import Google API Client.
test_should_return_bigquery_floats_as_python_floats (pandas.io.tests.test_gbq.GBQUnitTests) ... SKIP: Could not import Google API Client.
test_should_return_bigquery_integers_as_python_floats (pandas.io.tests.test_gbq.GBQUnitTests) ... SKIP: Could not import Google API Client.
test_should_return_bigquery_strings_as_python_strings (pandas.io.tests.test_gbq.GBQUnitTests) ... SKIP: Could not import Google API Client.
test_should_return_bigquery_timestamps_as_numpy_datetime (pandas.io.tests.test_gbq.GBQUnitTests) ... SKIP: Could not import Google API Client.
test_that_parse_data_works_properly (pandas.io.tests.test_gbq.GBQUnitTests) ... SKIP: Could not import Google API Client.
test_to_gbq_should_fail_if_invalid_table_name_passed (pandas.io.tests.test_gbq.GBQUnitTests) ... SKIP: Could not import Google API Client.
test_to_gbq_with_no_project_id_given_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... SKIP: Could not import Google API Client.
test_get_application_default_credentials_does_not_throw_error (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... SKIP: Could not import Google API Client.
test_get_application_default_credentials_returns_credentials (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... SKIP: Could not import Google API Client.
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... SKIP: Could not import Google API Client.
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... SKIP: Could not import Google API Client.
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... SKIP: Could not import Google API Client.
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... SKIP: Could not import Google API Client.
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... SKIP: Could not import Google API Client.
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... SKIP: Could not import Google API Client.
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... SKIP: Could not import Google API Client.
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... SKIP: Could not import Google API Client.
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... SKIP: Could not import Google API Client.
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... SKIP: Could not import Google API Client.
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... SKIP: Could not import Google API Client.
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... SKIP: Could not import Google API Client.
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... SKIP: Could not import Google API Client.
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... SKIP: Could not import Google API Client.
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... SKIP: Could not import Google API Client.
SKIP: Could not import Google API Client.
SKIP: Could not import Google API Client.
SKIP: Could not import Google API Client.
SKIP: Could not import Google API Client.
pandas.io.tests.test_gbq.test_requirements ... SKIP: Could not import Google API Client.
pandas.io.tests.test_gbq.test_generate_bq_schema_deprecated ... ok

----------------------------------------------------------------------
Ran 34 tests in 0.789s

OK (SKIP=37)
```
 @mhaseebtariq :+1: Lightning fast!
 All tests pass locally.

I also found that Pandas GBQ integration now works seamlessly in [Google Datalab](https://cloud.google.com/datalab/docs/quickstarts/quickstart-local) with this PR.

Note: This only works if user is already logged into Google Datalab. One observation that I noticed is that Google Datalab usually prompts the user to sign in if `oauth2client.client.GoogleCredentials.get_application_default()` fails, but in this case the exception is hidden in pandas, so user may not know that they need to sign in to Datalab in order to avoid the additional sign in process for pandas.

```
tony@tonypc:~/pandas-master/pandas/io/tests$ nosetests test_gbq.py -v
test_import_google_api_python_client (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_corrupted_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_empty_private_key_file_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_empty_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_invalid_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_no_project_id_given_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_private_key_json_wrong_types_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_booleans_as_python_booleans (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_floats_as_python_floats (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_integers_as_python_floats (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_strings_as_python_strings (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_timestamps_as_numpy_datetime (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_that_parse_data_works_properly (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_to_gbq_should_fail_if_invalid_table_name_passed (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_to_gbq_with_no_project_id_given_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_get_application_default_credentials_does_not_throw_error (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_get_application_default_credentials_returns_credentials (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... SKIP: Cannot get default_credentials from the environment!
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_bad_project_id (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_bad_table_name (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_column_order (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_column_order_plus_index (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_download_dataset_larger_than_200k_rows (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_index_column (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_invalid_option_for_sql_dialect (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_legacy_sql (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_malformed_query (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_arbitrary_timestamp (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_empty_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_false_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_floats (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_integers (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_timestamp (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_timestamp_unix_epoch (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_true_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_valid_floats (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_valid_integers (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_valid_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_read_as_service_account_with_key_contents (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_read_as_service_account_with_key_path (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_standard_sql (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_unicode_string_conversion_and_normalization (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_zero_rows (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_create_dataset (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_create_table (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_dataset_does_not_exist (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_dataset_exists (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_delete_dataset (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_delete_table (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_generate_schema (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_google_upload_errors_should_raise_exception (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_list_dataset (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_list_table (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_list_table_zero_results (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_table_does_not_exist (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data_if_table_exists_append (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data_if_table_exists_fail (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data_if_table_exists_replace (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data_as_service_account_with_key_contents (pandas.io.tests.test_gbq.TestToGBQIntegrationServiceAccountKeyContents) ... ok
test_upload_data_as_service_account_with_key_path (pandas.io.tests.test_gbq.TestToGBQIntegrationServiceAccountKeyPath) ... ok
pandas.io.tests.test_gbq.test_requirements ... ok
pandas.io.tests.test_gbq.test_generate_bq_schema_deprecated ... ok

----------------------------------------------------------------------
Ran 79 tests in 384.230s

OK (SKIP=1)
```
 I receive the following error with `google-api-python-client==1.2` and `oauth2client>1.2`

```
tony@tonypc:~/pandas-master/pandas/io/tests$ nosetests test_gbq.py -v
test_import_google_api_python_client (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_corrupted_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_empty_private_key_file_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_empty_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_invalid_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_no_project_id_given_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_private_key_json_wrong_types_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_booleans_as_python_booleans (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_floats_as_python_floats (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_integers_as_python_floats (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_strings_as_python_strings (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_timestamps_as_numpy_datetime (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_that_parse_data_works_properly (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_to_gbq_should_fail_if_invalid_table_name_passed (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_to_gbq_with_no_project_id_given_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_get_application_default_credentials_does_not_throw_error (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ERROR
test_get_application_default_credentials_returns_credentials (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ERROR
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ERROR
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ERROR
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ERROR
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ERROR
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ERROR
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_bad_project_id (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_bad_table_name (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_column_order (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_column_order_plus_index (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_download_dataset_larger_than_200k_rows (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_index_column (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_invalid_option_for_sql_dialect (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_legacy_sql (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_malformed_query (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_should_properly_handle_arbitrary_timestamp (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_should_properly_handle_empty_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_should_properly_handle_false_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_should_properly_handle_null_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_should_properly_handle_null_floats (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_should_properly_handle_null_integers (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_should_properly_handle_null_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_should_properly_handle_null_timestamp (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_should_properly_handle_timestamp_unix_epoch (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_should_properly_handle_true_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_should_properly_handle_valid_floats (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_should_properly_handle_valid_integers (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_should_properly_handle_valid_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_should_read_as_service_account_with_key_contents (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_read_as_service_account_with_key_path (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_standard_sql (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_unicode_string_conversion_and_normalization (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
test_zero_rows (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ERROR
ERROR
test_upload_data_as_service_account_with_key_contents (pandas.io.tests.test_gbq.TestToGBQIntegrationServiceAccountKeyContents) ... ok
test_upload_data_as_service_account_with_key_path (pandas.io.tests.test_gbq.TestToGBQIntegrationServiceAccountKeyPath) ... ok
pandas.io.tests.test_gbq.test_requirements ... ok
pandas.io.tests.test_gbq.test_generate_bq_schema_deprecated ... ok

======================================================================
ERROR: test_get_application_default_credentials_does_not_throw_error (pandas.io.tests.test_gbq.TestGBQConnectorIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 220, in setUp
    self.sut = gbq.GbqConnector(PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_get_application_default_credentials_returns_credentials (pandas.io.tests.test_gbq.TestGBQConnectorIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 220, in setUp
    self.sut = gbq.GbqConnector(PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 220, in setUp
    self.sut = gbq.GbqConnector(PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 220, in setUp
    self.sut = gbq.GbqConnector(PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 220, in setUp
    self.sut = gbq.GbqConnector(PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 220, in setUp
    self.sut = gbq.GbqConnector(PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 220, in setUp
    self.sut = gbq.GbqConnector(PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_bad_project_id (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 569, in test_bad_project_id
    gbq.read_gbq("SELECT 1", project_id='001')
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_bad_table_name (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 574, in test_bad_table_name
    project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_column_order (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 546, in test_column_order
    query, project_id=PROJECT_ID, col_order=col_order)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_column_order_plus_index (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 555, in test_column_order_plus_index
    index_col='STRING_1', col_order=col_order)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_download_dataset_larger_than_200k_rows (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 583, in test_download_dataset_larger_than_200k_rows
    project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_index_column (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 537, in test_index_column
    query, project_id=PROJECT_ID, index_col="STRING_1")
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_invalid_option_for_sql_dialect (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 639, in test_invalid_option_for_sql_dialect
    dialect='standard')
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_legacy_sql (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 604, in test_legacy_sql
    dialect='standard')
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_malformed_query (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 565, in test_malformed_query
    project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_properly_handle_arbitrary_timestamp (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 494, in test_should_properly_handle_arbitrary_timestamp
    df = gbq.read_gbq(query, project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_properly_handle_empty_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 457, in test_should_properly_handle_empty_strings
    df = gbq.read_gbq(query, project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_properly_handle_false_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 511, in test_should_properly_handle_false_boolean
    df = gbq.read_gbq(query, project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_properly_handle_null_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 516, in test_should_properly_handle_null_boolean
    df = gbq.read_gbq(query, project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_properly_handle_null_floats (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 483, in test_should_properly_handle_null_floats
    df = gbq.read_gbq(query, project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_properly_handle_null_integers (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 472, in test_should_properly_handle_null_integers
    df = gbq.read_gbq(query, project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_properly_handle_null_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 462, in test_should_properly_handle_null_strings
    df = gbq.read_gbq(query, project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_properly_handle_null_timestamp (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 501, in test_should_properly_handle_null_timestamp
    df = gbq.read_gbq(query, project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_properly_handle_timestamp_unix_epoch (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 488, in test_should_properly_handle_timestamp_unix_epoch
    df = gbq.read_gbq(query, project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_properly_handle_true_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 506, in test_should_properly_handle_true_boolean
    df = gbq.read_gbq(query, project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_properly_handle_valid_floats (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 477, in test_should_properly_handle_valid_floats
    df = gbq.read_gbq(query, project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_properly_handle_valid_integers (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 467, in test_should_properly_handle_valid_integers
    df = gbq.read_gbq(query, project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_should_properly_handle_valid_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 452, in test_should_properly_handle_valid_strings
    df = gbq.read_gbq(query, project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_standard_sql (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 619, in test_standard_sql
    gbq.read_gbq(standard_sql, project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_unicode_string_conversion_and_normalization (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 531, in test_unicode_string_conversion_and_normalization
    df = gbq.read_gbq(query, project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test_zero_rows (pandas.io.tests.test_gbq.TestReadGBQIntegration)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 591, in test_zero_rows
    project_id=PROJECT_ID)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 689, in read_gbq
    dialect=dialect)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

======================================================================
ERROR: test suite for <class 'pandas.io.tests.test_gbq.TestToGBQIntegration'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/anaconda/lib/python2.7/site-packages/nose/suite.py", line 209, in run
    self.setUp()
  File "/home/tony/anaconda/lib/python2.7/site-packages/nose/suite.py", line 292, in setUp
    self.setupContext(ancestor)
  File "/home/tony/anaconda/lib/python2.7/site-packages/nose/suite.py", line 315, in setupContext
    try_run(context, names)
  File "/home/tony/anaconda/lib/python2.7/site-packages/nose/util.py", line 471, in try_run
    return func()
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 658, in setUpClass
    clean_gbq_environment()
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 177, in clean_gbq_environment
    dataset = gbq._Dataset(PROJECT_ID, private_key=private_key)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 972, in __init__
    private_key)
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 156, in __init__
    self.credentials = self.get_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 164, in get_credentials
    credentials = self.get_application_default_credentials()
  File "/home/tony/pandas-master/pandas/io/gbq.py", line 206, in get_application_default_credentials
    bigquery_service = build('bigquery', 'v2', credentials=credentials)
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

----------------------------------------------------------------------
Ran 63 tests in 94.503s

FAILED (errors=33)
```
 Additional output from local test

```
>>> import googleapiclient
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named googleapiclient
>>> import apiclient
>>> apiclient.__version__
'1.2'
>>> from oauth2client.client import GoogleCredentials
>>> credentials = GoogleCredentials.get_application_default()
>>> from googleapiclient.discovery import build
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named googleapiclient.discovery
>>> from apiclient.discovery import build
>>> bigquery_service = build('bigquery', 'v2', credentials=credentials)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/tony/anaconda/lib/python2.7/site-packages/oauth2client/util.py", line 142, in positional_wrapper
    return wrapped(*args, **kwargs)
TypeError: build() got an unexpected keyword argument 'credentials'

```
 Looks good to me. I tested 3 different configurations. 

Test scenario 1: 
oauth2client==1.2
google-api-python-client==1.2

```
>>> import oauth2client
>>> oauth2client.__version__
'1.2'
>>> import apiclient
>>> apiclient.__version__
'1.2'
>>> quit()
tony@tonypc:~/pandas-master/pandas/io/tests$ nosetests test_gbq.py -v
test_import_google_api_python_client (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_corrupted_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_empty_private_key_file_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_empty_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_invalid_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_no_project_id_given_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_private_key_json_wrong_types_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_booleans_as_python_booleans (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_floats_as_python_floats (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_integers_as_python_floats (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_strings_as_python_strings (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_timestamps_as_numpy_datetime (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_that_parse_data_works_properly (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_to_gbq_should_fail_if_invalid_table_name_passed (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_to_gbq_with_no_project_id_given_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_get_application_default_credentials_does_not_throw_error (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_get_application_default_credentials_returns_credentials (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... SKIP: Cannot get default_credentials from the environment!
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_bad_project_id (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_bad_table_name (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_column_order (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_column_order_plus_index (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_download_dataset_larger_than_200k_rows (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_index_column (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_invalid_option_for_sql_dialect (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_legacy_sql (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_malformed_query (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_arbitrary_timestamp (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_empty_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_false_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_floats (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_integers (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_timestamp (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_timestamp_unix_epoch (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_true_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_valid_floats (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_valid_integers (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_valid_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_read_as_service_account_with_key_contents (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_read_as_service_account_with_key_path (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_standard_sql (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_unicode_string_conversion_and_normalization (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_zero_rows (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_create_dataset (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_create_table (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_dataset_does_not_exist (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_dataset_exists (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_delete_dataset (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_delete_table (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_generate_schema (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_google_upload_errors_should_raise_exception (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_list_dataset (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_list_table (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_list_table_zero_results (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_table_does_not_exist (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data_if_table_exists_append (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data_if_table_exists_fail (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data_if_table_exists_replace (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data_as_service_account_with_key_contents (pandas.io.tests.test_gbq.TestToGBQIntegrationServiceAccountKeyContents) ... ok
test_upload_data_as_service_account_with_key_path (pandas.io.tests.test_gbq.TestToGBQIntegrationServiceAccountKeyPath) ... ok
pandas.io.tests.test_gbq.test_requirements ... ok
pandas.io.tests.test_gbq.test_generate_bq_schema_deprecated ... ok

----------------------------------------------------------------------
Ran 79 tests in 404.635s

OK (SKIP=1)
```

Test scenario 2: 
oauth2client==3.0.0
google-api-python-client==1.2

```
>>> import oauth2client
>>> oauth2client.__version__
'3.0.0'
>>> import apiclient
>>> apiclient.__version__
'1.2'
>>> quit()
tony@tonypc:~/pandas-master/pandas/io/tests$ nosetests test_gbq.py -v
test_import_google_api_python_client (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_corrupted_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_empty_private_key_file_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_empty_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_invalid_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_no_project_id_given_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_private_key_json_wrong_types_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_booleans_as_python_booleans (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_floats_as_python_floats (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_integers_as_python_floats (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_strings_as_python_strings (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_timestamps_as_numpy_datetime (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_that_parse_data_works_properly (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_to_gbq_should_fail_if_invalid_table_name_passed (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_to_gbq_with_no_project_id_given_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_get_application_default_credentials_does_not_throw_error (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_get_application_default_credentials_returns_credentials (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... SKIP: Cannot get default_credentials from the environment!
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_bad_project_id (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_bad_table_name (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_column_order (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_column_order_plus_index (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_download_dataset_larger_than_200k_rows (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_index_column (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_invalid_option_for_sql_dialect (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_legacy_sql (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_malformed_query (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_arbitrary_timestamp (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_empty_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_false_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_floats (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_integers (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_timestamp (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_timestamp_unix_epoch (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_true_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_valid_floats (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_valid_integers (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_valid_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_read_as_service_account_with_key_contents (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_read_as_service_account_with_key_path (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_standard_sql (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_unicode_string_conversion_and_normalization (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_zero_rows (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_create_dataset (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_create_table (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_dataset_does_not_exist (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_dataset_exists (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_delete_dataset (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_delete_table (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_generate_schema (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_google_upload_errors_should_raise_exception (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_list_dataset (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_list_table (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_list_table_zero_results (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_table_does_not_exist (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data_if_table_exists_append (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data_if_table_exists_fail (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data_if_table_exists_replace (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data_as_service_account_with_key_contents (pandas.io.tests.test_gbq.TestToGBQIntegrationServiceAccountKeyContents) ... ok
test_upload_data_as_service_account_with_key_path (pandas.io.tests.test_gbq.TestToGBQIntegrationServiceAccountKeyPath) ... ok
pandas.io.tests.test_gbq.test_requirements ... ok
pandas.io.tests.test_gbq.test_generate_bq_schema_deprecated ... ok

----------------------------------------------------------------------
Ran 79 tests in 414.826s

OK (SKIP=1)
```

Test scenario 3: 
oauth2client==3.0.0
google-api-python-client==1.5.1
Note: expect `test_import_google_api_python_client()` to fail. This is by design to ensure that we test `google-api-python-client==1.2`

```
>>> import oauth2client
>>> oauth2client.__version__
'3.0.0'
>>> import googleapiclient
>>> googleapiclient.__version__
'1.5.1'
>>> quit()
tony@tonypc:~/pandas-master/pandas/io/tests$ nosetests test_gbq.py -v
test_import_google_api_python_client (pandas.io.tests.test_gbq.GBQUnitTests) ... FAIL
test_read_gbq_with_corrupted_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_empty_private_key_file_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_empty_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_invalid_private_key_json_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_no_project_id_given_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_read_gbq_with_private_key_json_wrong_types_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_booleans_as_python_booleans (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_floats_as_python_floats (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_integers_as_python_floats (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_strings_as_python_strings (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_should_return_bigquery_timestamps_as_numpy_datetime (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_that_parse_data_works_properly (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_to_gbq_should_fail_if_invalid_table_name_passed (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_to_gbq_with_no_project_id_given_should_fail (pandas.io.tests.test_gbq.GBQUnitTests) ... ok
test_get_application_default_credentials_does_not_throw_error (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_get_application_default_credentials_returns_credentials (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... SKIP: Cannot get default_credentials from the environment!
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorIntegration) ... ok
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyContentsIntegration) ... ok
test_should_be_able_to_get_a_bigquery_service (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_get_results_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_get_schema_from_query (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_get_valid_credentials (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_should_be_able_to_make_a_connector (pandas.io.tests.test_gbq.TestGBQConnectorServiceAccountKeyPathIntegration) ... ok
test_bad_project_id (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_bad_table_name (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_column_order (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_column_order_plus_index (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_download_dataset_larger_than_200k_rows (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_index_column (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_invalid_option_for_sql_dialect (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_legacy_sql (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_malformed_query (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_arbitrary_timestamp (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_empty_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_false_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_floats (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_integers (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_null_timestamp (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_timestamp_unix_epoch (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_true_boolean (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_valid_floats (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_valid_integers (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_properly_handle_valid_strings (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_read_as_service_account_with_key_contents (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_should_read_as_service_account_with_key_path (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_standard_sql (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_unicode_string_conversion_and_normalization (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_zero_rows (pandas.io.tests.test_gbq.TestReadGBQIntegration) ... ok
test_create_dataset (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_create_table (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_dataset_does_not_exist (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_dataset_exists (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_delete_dataset (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_delete_table (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_generate_schema (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_google_upload_errors_should_raise_exception (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_list_dataset (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_list_table (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_list_table_zero_results (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_table_does_not_exist (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data_if_table_exists_append (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data_if_table_exists_fail (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data_if_table_exists_replace (pandas.io.tests.test_gbq.TestToGBQIntegration) ... ok
test_upload_data_as_service_account_with_key_contents (pandas.io.tests.test_gbq.TestToGBQIntegrationServiceAccountKeyContents) ... ok
test_upload_data_as_service_account_with_key_path (pandas.io.tests.test_gbq.TestToGBQIntegrationServiceAccountKeyPath) ... ok
pandas.io.tests.test_gbq.test_requirements ... ok
pandas.io.tests.test_gbq.test_generate_bq_schema_deprecated ... ok

======================================================================
FAIL: test_import_google_api_python_client (pandas.io.tests.test_gbq.GBQUnitTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tony/pandas-master/pandas/io/tests/test_gbq.py", line 332, in test_import_google_api_python_client
    from googleapiclient.errors import HttpError  # noqa
  File "/home/tony/pandas-master/pandas/util/testing.py", line 2435, in __exit__
    raise AssertionError("{0} not raised.".format(name))
AssertionError: ImportError not raised.

----------------------------------------------------------------------
Ran 79 tests in 398.691s

FAILED (SKIP=1, failures=1)
```
 Hi @jreback I was wondering when will this pull request be closed - all tests have passed now. Thanks!
 This is not even running thru travis at all. pls add the deps that are required to one of the `ci\*` files that currently do the bigquery import tests.
 @jreback on: "...add deps that are required to one of the `ci\*` files..."

The dependent library is already mentioned in `requirements-2.7.pip` and `requirements-3.4.pip` -

`google-api-python-client==1.2` (wrong version)

This change requires google-api-python-client==**1.5** though.

What do you suggest I should do then - change the version numbers for this library in these files?
 @mhaseebtariq so the import tests should then work on 3.4 build (which has latest version), and skip on 2.7. pls show the results from travis here 
 @jreback Even with the correct library version, the test will still be skipped because - The user should be logged in to Google Cloud in the environment the tests are being run. 

**partheas** has already successfully tested the functionality on the correct environment.
 > partheas has already successfully tested the functionality on the correct environment.

Yes. All gbq tests pass.

> This change requires `google-api-python-client==1.5` though.

I've confirmed both `google-api-python-client==1.2` and `google-api-python-client==1.5.1` works

This feature isn't supported if `oauth2client==1.2`  (that version doesn't have `client.GoogleCredentials`)
 @parthea this is strange - https://github.com/pydata/pandas/pull/13608/commits/6bbdcdc0a85ab08e8414051034e1409fb3086209
is failing. This is just a change in the documentation. Would you know what's happening? Thanks!
 @mhaseebtariq Try adding your forked repository (mhaseebtariq/pandas) to https://travis-ci.org/. Its super easy. Register at https://travis-ci.org/ , then add your forked repository. This will allow you to retry builds to see whether the error is reproducible.
 Now the tests are passing!
 thanks!
