pydata/pandas — pull request #7090 by sinhrks (2014-05-10 07:10:27+00:00)
Title: ENH/CLN: Add factorize to IndexOpsMixin

As pointed in #7041, I prepared a PR to add `factorize` to `IndexOpsMixin`.

As a side benefit, `Multiindex.from_arrays` can preserve original `DatetimeIndex.freq` and `tz`. (Related to #3950 and #6606. These issues are not solved yet because these use different methods to create `MultiIndex`).

I would like to confirm following points before adding more tests.

- What `Index.factorize` and `Series.factorize` should return as unique values, `ndarray` or `Index`? I think it should return `Index` to preserve `DatetimeIndex` attributes (`freq` and `tz`).
- Is this should be added to `api.rst`?