From the course: Data Science on Google Cloud Platform: Exploratory Data Analytics

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Working with DataFrames

Working with DataFrames - Google Cloud Tutorial

From the course: Data Science on Google Cloud Platform: Exploratory Data Analytics

Start my 1-month free trial

Working with DataFrames

- [Instructor] In this video, I will show you how to fetch BigQuery data into a Pandas DataFrame. Once you can get the data into a Pandas DataFrame, you can use regular Python capabilities for further work on analyze data. Let use use the BigQuery SDK to accomplish this. We first import the package for the client SDK using import google.datalab.bigquery as bq. The package is preloaded into the GCP Python environment during the setup process so you don't have to install it explicitly. Now we can create a query object using the bq.query function call. We can also set up output options as to not cache data. We then execute the query using the execute function call that extracts the results from the query and stores them into the cust_results object. Then we use the to_dataframe function to convert the cust_result object into the cust_df DataFrame. We them print the DataFrame to look at the DataFrame contents. Now you can use this DataFrame to do further glimpsing, analysis, exploration…

Contents