You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have installed: python 3.8.6, pandas 1.2.1 and altair 4.1.0. In the pandas version 1.2.0 they introduced a new "experimental" data type for nullable floats. I know that this type is experimental but a proper handling for nullable data is really convenient.
When I use this new type with altair I get a type error:
df=pd.DataFrame({'a': [1, 2, 3, 4, 5], 'b': [1.1, 2.5, np.nan, 1, 3.3]})
df=df.convert_dtypes() # convert b from float64 to Float64chart=alt.Chart(df).mark_line().encode(
x='a',
y='b'
)
TypeError: Cannot interpret 'Float64Dtype()' as a data type
The text was updated successfully, but these errors were encountered:
Thanks - it looks like this arises from the fact that np.issubdtype does not understand pandas new dtypes, which is unfortunate. I suspect that breaks a lot of people's code.
Hi,
I have installed: python 3.8.6, pandas 1.2.1 and altair 4.1.0. In the pandas version 1.2.0 they introduced a new "experimental" data type for nullable floats. I know that this type is experimental but a proper handling for nullable data is really convenient.
When I use this new type with altair I get a type error:
The text was updated successfully, but these errors were encountered: