A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/42137 below:

constructing nullable integer and floating arrays from boolean data · Issue #42137 · pandas-dev/pandas · GitHub

From #41970 (comment), right now constructing nullable integer (and floating) arrays from boolean data has the following behavior:

In [2]: pd.Series([True, False, True, True], dtype='Int64')
Out[2]:
0    1
1    0
2    1
3    1
dtype: Int64

In [3]: pd.Series([True, False, True, pd.NA], dtype='Int64')
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
...
TypeError: object cannot be converted to an IntegerDtype

This seems inconsistent, if so, which behavior is correct?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4