Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Add Series.to_list, alias for tolist #8826

Closed
scls19fr opened this issue Nov 15, 2014 · 2 comments

Comments

Projects
None yet
4 participants
@scls19fr
Copy link
Contributor

commented Nov 15, 2014

Hello,

IPython autocomplete (tab) shows

In [1]: ts.to
ts.to_clipboard  ts.to_frame      ts.to_period     ts.to_string
ts.to_csv        ts.to_hdf        ts.to_pickle     ts.to_timestamp
ts.to_dense      ts.to_json       ts.to_sparse     ts.tolist
ts.to_dict       ts.to_msgpack    ts.to_sql

maybe tolist should be named to_list
and tolist should be marked as deprecated
because it seems that other methods follow
an implicit naming convention (to_...) .

Kind regards

@jreback jreback added this to the 0.16.0 milestone Nov 15, 2014

@jreback

This comment has been minimized.

Copy link
Contributor

commented Nov 15, 2014

this is for compat with numpy, e.g. numpy.tolist is the standard method.

So, could add to_list to call tolist but can't change it.

But it would make things a bit more consistent. needs to be added in pandas/core/base/IndexOpsMixin (so both series/index getit)

pull-requests welcome!

@jorisvandenbossche

This comment has been minimized.

Copy link
Member

commented Nov 15, 2014

+1 for adding a to_list alias (but indeed not deprecating tolist)

@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 6, 2015

@wesm wesm changed the title Pandas Series tolist method should be named to_list ENH: Add Series.to_list, alias for tolist Jul 6, 2018

@ScientiaEtVeritas ScientiaEtVeritas referenced this issue Oct 28, 2018

Merged

ENH: to_list as alias for tolist #23398

4 of 4 tasks complete

@jreback jreback modified the milestones: Contributions Welcome, 0.24.0 Nov 1, 2018

@jreback jreback modified the milestones: 0.24.0, Contributions Welcome Dec 2, 2018

@jreback jreback modified the milestones: Contributions Welcome, 0.24.0 Dec 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.