ENH: Index StringMethods should return MultiIndex when result dimension is more than one (original) (raw)
Currently the Index.str methods only support returning Index results. However, analogous to the expansion from Series.str.* -> DataFrame, we should be able to do Index.str.* -> MultiIndex in certain cases, as discussed in #9870 (comment)
Some of the string methods that can support this are: str.get_dummies, str.extract, str.split
split(DEPR: Deprecate str.split return_type #10085)rsplit(ENH: added rsplit to StringMethods #10303)partition/rpartition(ENH: Add StringMethods.partition and rpartition #9773)extract(ENH: str.extractall for several matches #11386, only supports one group )extractall(not implemented in Index), ENH/BUG: str.extractall doesn't support index #13156get_dummies(ENH: Add Index.str.get_dummies #12842)