xref #9667 Now we also have string methods available on the index, the possible options for return_type
('series', 'frame') are a bit confusing I think: it will be confusing for users to get a Index back even if he/she supplies return_type='series'
on a Index.str.split, or to get a series back with Series.str.split(.., return_type='index')
?
Possible ways to make this a better API:
An expand
keyword (or another name), that indicates for False
: give same dimension back (so for series/index keep it a series/index), and for True
: expand series to dataframe.
This would then be a duplicate for return_type
of course. But the return_type
was only introduced in 0.15.1 (and for partition
it is still in a PR), so if we want to change this: better now than later. Or has this ship sailed?
easier solution of @jreback: return_type='same'|'expand'
to satisfy this need? (and can be easily back-compat) -> so no need to change the name of the keyword, only the arguments.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4