Skip to content

Commit

Permalink
fix: test_dataframe_to_arrow_with_unknown_type testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaurang033 committed Nov 3, 2023
1 parent 8eb8e47 commit 3a57815
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions google/cloud/bigquery/_pandas_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,13 @@ def _check_nullability(arrow_fields, dataframe):
if dataframe.index.name:
dataframe[dataframe.index.name] = dataframe.index
for arrow_field in arrow_fields:
col_name = arrow_field.name
if (
not arrow_field.nullable
and dataframe[arrow_field.name].isnull().values.any()
):
raise ValueError(f"required field {col_name} can not be nulls")
if arrow_field:
col_name = arrow_field.name
if (
not arrow_field.nullable
and dataframe[arrow_field.name].isnull().values.any()
):
raise ValueError(f"required field {col_name} can not be nulls")


def get_column_or_index(dataframe, name):
Expand Down

0 comments on commit 3a57815

Please sign in to comment.