Skip to content

Commit ae17ea4

Browse files
tswastchalmerlowe
andauthored
Update pandas_gbq/schema/pandas_to_bigquery.py
Co-authored-by: Chalmer Lowe <[email protected]>
1 parent 58a0e54 commit ae17ea4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas_gbq/schema/pandas_to_bigquery.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ def dtype_to_bigquery_field(name, dtype) -> Optional[schema.SchemaField]:
169169
def value_to_bigquery_field(
170170
name, value, default_type=None
171171
) -> Optional[schema.SchemaField]:
172-
# There are no non-null values, so assume the default type.
172+
# Set the SchemaField datatype to the given default_type if the value
173+
# being assessed is None.
173174
if value is None:
174175
return schema.SchemaField(name, default_type)
175176

0 commit comments

Comments
 (0)