_Originally posted by @jreback in https://github.com/pandas-dev/pandas/pull/23321_