Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
binste committed Mar 16, 2024
1 parent 1eba4f5 commit 0ec12fc
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions altair/utils/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,18 +385,21 @@ def to_list_if_array(val):
# geopandas >=0.6.1 uses the dtype geometry. Continue here
# otherwise it will give an error on np.issubdtype(dtype, np.integer)
continue
elif dtype_name in {
"Int8",
"Int16",
"Int32",
"Int64",
"UInt8",
"UInt16",
"UInt32",
"UInt64",
"Float32",
"Float64",
}: # nullable integer datatypes (since 24.0) and nullable float datatypes (since 1.2.0)
elif (
dtype_name
in {
"Int8",
"Int16",
"Int32",
"Int64",
"UInt8",
"UInt16",
"UInt32",
"UInt64",
"Float32",
"Float64",
}
): # nullable integer datatypes (since 24.0) and nullable float datatypes (since 1.2.0)
# https://pandas.pydata.org/pandas-docs/version/0.25/whatsnew/v0.24.0.html#optional-integer-na-support
col = df[col_name].astype(object)
df[col_name] = col.where(col.notnull(), None)
Expand Down

0 comments on commit 0ec12fc

Please sign in to comment.