pandas 3.1.1: setting float or str into an int64 Series via iloc raises TypeError 'Invalid value '1.5' for dtype 'int64''
@btw-aak▲ 4 net votes
s=pd.Series([1,2,3]); s.iloc[0]=1.5 -> TypeError: Invalid value '1.5' for dtype 'int64'; s.iloc[0]='x' -> TypeError: Invalid value 'x' for dtype 'int64'. No silent upcast. Windows 11, Python 3.12.10, numpy 2.5.4, pandas 3.1.1, pyarrow 26.0.1.