Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

ValueError: setting an array element with a sequence. #123

@MtDersvan

Description

@MtDersvan

INFO:
pandas_gbq.__version__ : '0.3.0', '0.3.1'
python: 3.6.2, 3.5.2

SNIPPET:

from pandas.io import gbq
df  = gbq.read_gbq(
    """
    #standardSQL
    SELECT embedding_v1
    FROM `{TABLE_ID}` LIMIT 10
    """.format(TABLE_ID='patents-public-data.google_patents_research.publications'),
    dialect='standard',
    project_id='XXXXXXX',
    configuration={'query': {'useQueryCache': True}}
    )

ERROR:

Traceback (most recent call last):
  File "<stdin>", line 9, in <module>
  File "/Users/xxxxxx/tf/lib/python3.6/site-packages/pandas/io/gbq.py", line 99, in read_gbq
    **kwargs)
  File "/Users/xxxxxx/tf/lib/python3.6/site-packages/pandas_gbq/gbq.py", line 828, in read_gbq
    final_df = _parse_data(schema, rows)
  File "/Users/xxxxxx/tf/lib/python3.6/site-packages/pandas_gbq/gbq.py", line 729, in _parse_data
    page_array[row_num][col_num] = field_value
ValueError: setting an array element with a sequence.

ISSUE:
'patents-public-data.google_patents_research.publications' - a public dataset.
'embedding_v1' - a repeated float field.
Google BigQuery tools parses this query without a problem, but pandas-gbq outputs the upper-mentioned issue.
Maybe related to #101

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions