Manul backport of pr 31666 on 1.0.x
Kind of confused, it looks like the test implemented by 31666 already got backported?
https://github.com/pandas-dev/pandas/pull/31688/files got this already, right? Looks like it, closing.