See https://github.com/pandas-dev/pandas/pull/15039 and https://github.com/pandas-dev/pandas/pull/10030