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/32346 below:

assignment with enlargement gives object dtype with ExtensionArrays · Issue #32346 · pandas-dev/pandas · GitHub

From #32271, when setting with enlargment, the dtype gets converted into object dtype (while for normal integer or boolean dtype this is not the case):

In [10]: s = pd.Series([1, 2, 3], dtype="Int64")  

In [11]: s[3] = 4 

In [12]: s   
Out[12]: 
0    1
1    2
2    3
3    4
dtype: object

In [13]: s = pd.Series([1, 2, 3], dtype="int64") 

In [14]: s[3] = 4   

In [15]: s  
Out[15]: 
0    1
1    2
2    3
3    4
dtype: int64

It also happens with eg DecimalArray from our tests, so suppose it is a general issue with ExtensionArrays.


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