See https://github.com/pandas-dev/pandas/issues/17102#issuecomment-326746184
GitHub Pull Request #2227