Skip to content

ENH: Added optional pickle protocol version argument to pandas.to_pickle() #14526

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

Closed
wants to merge 1 commit into from
Closed

Conversation

josephbwagner
Copy link

… :issue:'14488'

@@ -1200,7 +1200,7 @@ def to_sql(self, name, con, flavor=None, schema=None, if_exists='fail',
if_exists=if_exists, index=index, index_label=index_label,
chunksize=chunksize, dtype=dtype)

def to_pickle(self, path):
def to_pickle(self, path, protocol):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protocol should be an optional argument here. You'll probably need to have the default be None, and then determine the correct protocol based on the python version (see pandas.compat). The default should be the same as python's default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually HIGHEST_PROTOCOL should work I think.

@jreback
Copy link
Contributor

jreback commented Dec 6, 2016

can you rebase

@jreback jreback added API Design Compat pandas objects compatability with Numpy or Python functions labels Dec 6, 2016
@jreback
Copy link
Contributor

jreback commented Dec 30, 2016

closing as stale, but if you would like to update, pls comment.

@jbschiratti
Copy link
Contributor

jbschiratti commented May 5, 2017

If the original author @beverast lost interest in the PR, I would like to take over.
I am also interested in having an optional parameter protocol to the to_pickle function.
cc @jreback

@jreback
Copy link
Contributor

jreback commented May 5, 2017

sure u can start with the commits here if u like
open a new PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Compat pandas objects compatability with Numpy or Python functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding optional pickle protocol version argument to pandas.to_pickle()
5 participants