Enable Pylint warning `consider-using-ternary`
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

Enables the Pylint type-W warning `consider-using-ternary`.

Thanks @uzzell 