Skip to content

BigQuery: Adds load_table_from_dataframe() and snippet#5387

Merged
alixhami merged 4 commits into
googleapis:masterfrom
alixhami:bq-load-dataframe
May 29, 2018
Merged

BigQuery: Adds load_table_from_dataframe() and snippet#5387
alixhami merged 4 commits into
googleapis:masterfrom
alixhami:bq-load-dataframe

Conversation

@alixhami
Copy link
Copy Markdown
Contributor

Loads a pandas DataFrame to a BigQuery table by converting to parquet and loading

@alixhami alixhami added the api: bigquery Issues related to the BigQuery API. label May 24, 2018
@alixhami alixhami requested review from theacodes and tswast May 24, 2018 22:52
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 24, 2018
Comment thread docs/bigquery/snippets.py Outdated
# [END bigquery_load_table_dataframe]
column_names = [field.name for field in table.schema]
assert 'title' in column_names
assert 'release_year' in column_names

This comment was marked as spam.

{'name': 'Monty', 'age': 100},
{'name': 'Python', 'age': 60},
]
dataframe = pandas.DataFrame(records)

This comment was marked as spam.

This comment was marked as spam.

import pytest
try:
import pandas
except (ImportError, AttributeError): # pragma: NO COVER

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@alixhami alixhami merged commit fe57c5a into googleapis:master May 29, 2018
@alixhami alixhami deleted the bq-load-dataframe branch May 29, 2018 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the BigQuery API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants