Deprecate na_sentinel, add use_na_sentinel · Issue #46910 · pandas-dev/pandas (original) (raw)
Currently specifying na_sentinel=None
in pd.factorize will use the sentinel -1 and set (internally) dropna=False. EA's factorize currently doesn't allow na_sentinel
being None, and #46601 added the dropna argument to EA's factorize.
It seems best to me to change pd.factorize to match EA's factorize. Tagging as 1.5 since if we are to deprecate, I'd like to get it in.