Questions tagged [pandas.dataframe.to-gbq]

11 questions
2
votes
1 answer

String becomes float in BiqQuery table after import from pandas dataframe

I have a pandas dataframe with the following dtypes: Int64Index: 579585 entries, 0 to 579613 Data columns (total 7 columns): # Column Non-Null Count Dtype --- ------ -------------- …
1
vote
2 answers

ignore null values when loading data into BigQuery

I am loading data into bigquery, the data should be in order when I upload it from csv, but once loaded it gets shuffled in bigquery, as below, actual table: This how it should be in…
0
votes
0 answers

How do I use gbq from pandas.io to pull BigQuery data into Colab?

I have been at this for over six hours and cannot figure out why this process is so difficult. I watched every YouTube video, went through every tutorial, but they all assume extensive knowledge of some step of the process that isn't covered in…
0
votes
1 answer

Why GBQ doesn't work when I try to change it to a DataFrame?

I want to load and write data on my GBQ. I tried to use read_gbq() and followed the instructions for the authenticating. I used my service account for authentication. I referred to the official documentation of pandas_gbq shown below: from…
0
votes
1 answer

Adding table description using pandas-gbq.to_gbq

I am using the library pandas-gbq.to_gbq to create my tables on Google Big Query. Everything is working fine, except for the fact that I wasn't able to add the table description using this function (not column description). I've tried: schema = { …
0
votes
0 answers

Google Biq query data transfer service not updating GBQ table after first run

We are fetching data from Appsflyer source to a Google cloud storage bucket Then through data transfer service - trying to insert in gbq table Data transfer service is running successfully but data is not shown in GBQ table, but whenever we are…
0
votes
1 answer

Pandas to_gbq error due to type inconsistencies between MacOS and Windows

My Python/Pandas code is working fine on my MacOS, but now that I've moved it to Windows, it's not working due to type differences and I'm getting an error when trying to write to gbq (Google Big Query): The code is as follows: def formatNumber(x): …
dtam
  • 241
  • 1
  • 5
  • 15
0
votes
1 answer

Exporting pandas df with column of tuples to BQ throws pyarrow error

I have the following pandas dataframe: import pandas as pd df = pd.DataFrame({"id": [1,2,3], "items": [('a', 'b'), ('a', 'b', 'c'), tuple('d')]} >print(df) id items 0 1 (a, b) 1 2 (a, b, c) 2 3 (d,) After registering my…
Max Power
  • 8,265
  • 13
  • 50
  • 91
0
votes
1 answer

Pandas_gbq does not append in order

I am using VM instance in google cloud and i want to use bigquery as well. I am trying to append the newly generated report in while loop to last row of the bigquery table every 10 minutes with below script. position_size = np.zeros([24, 24],…
0
votes
0 answers

Pandas to_gbq freezes trying to insert small dataframe

I have a python script that grabs NBA game data from each day of the season. My script has a for loop which starts at day 1 and goes to current day. For each day, the script: Opens webpage with schedule for that day and gets all game info using…
0
votes
1 answer

How to append dataframe in google big query with different schema in python?

df1: Name Company Desgn Date Salary Rick JKA HR 2020-07-21 52 Nick lka Engg 2020-07-21 65 John SDK HR 2020-07-21 75 df2: Name Company Desgn Rick JKA HR Nick lka Engg …