pandas.io.gbq Version 2

closes #5840 (as new interface makes it obsolete)
closes #6096 

@jreback : We still have some documentation to work on, but we would like your initial thoughts on what we have so far. The key change for this version is the removal of bq.py as a dependency (except as a setup method for a test case). Instead, we rely entirely on the BigQuery python API. We also simplified to_gbq() significantly. Though it cost a few features, the code is much more manageable and less error prone (thanks Google!). Test cases are much more granular and run significantly faster. To use the test cases fully, a BigQuery project_id is still required, though there are some unittests offline. 
Actually BigQuery should return columns in the same order that is specified in the SQL statement. I'm not aware of any cases that this won't be true. If you have examples, please let me know.

Date: Tue, 10 Jun 2014 15:11:47 -0700
From: notifications@github.com
To: pandas@noreply.github.com
CC: jtigani@hotmail.com
Subject: Re: [pandas] pandas.io.gbq Version 2 (#6937)

In doc/source/io.rst:

>                               index_col='index_column_name',
> -                             col_order='[col1, col2, col3,...]', project_id = projectid)
> -
> -Finally, if you would like to create a BigQuery table, `my_dataset.my_table`, from the rows of DataFrame, `df`:
> +                             col_order=['col1', 'col2', 'col3',...], project_id = projectid)

I'll take out the ... from the example. BigQuery is different from standard databases like mySQL in that the order you specify in the SQL statement is not necessarily the order returned.  So, as a convenience, we added the col_order argument, so that you could achieve similar functionality.  You are correct that you could just df.reindex after getting the df back, too. 


—
Reply to this email directly or view it on GitHub.