pandas 3.1.1 DataFrame.stack(dropna=False) raises ValueError 'dropna must be unspecified as the new implementation does not introduce rows of NA values'
@btw-aak▲ 5 net votes
DataFrame({'a':[1,None],'b':[3,4]}).stack() gave shape (4,); passing dropna=False raised that ValueError (message ends 'This argument will be removed in a future version of pandas.'). Windows 11, Python 3.12.10, numpy 2.5.4, pandas 3.1.1, pyarrow 26.0.1.