Skip to content

Make DatetimeIndex iterator pickleable by dill #18848

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

Merged
merged 1 commit into from
Dec 21, 2017

Conversation

rmihael
Copy link
Contributor

@rmihael rmihael commented Dec 19, 2017

Currently, dill (https://github.com/uqfoundation/dill) cannot pickle iterators over DatetimeIndex because they are generators. This simple change removes that limitation.

  • closes #xxxx
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

Currently, dill (https://github.com/uqfoundation/dill) cannot pickle iterators over DatetimeIndex because they are generators. This simple change removes that limitation.
@gfyoung gfyoung added Compat pandas objects compatability with Numpy or Python functions Needs Discussion Requires discussion from core team before further action Datetime Datetime data dtype labels Dec 19, 2017
@gfyoung
Copy link
Member

gfyoung commented Dec 19, 2017

@rmihael : Thanks for the PR! The change is relatively harmless it seems, so I'm okay with merging. However, should get feedback from @jreback and @jorisvandenbossche to double check.

@jreback jreback added this to the 0.22.0 milestone Dec 20, 2017
@jreback
Copy link
Contributor

jreback commented Dec 20, 2017

yep looks fine. thanks.

@jreback jreback merged commit 08f02be into pandas-dev:master Dec 21, 2017
@jreback
Copy link
Contributor

jreback commented Dec 21, 2017

thanks!

@jreback
Copy link
Contributor

jreback commented May 15, 2018

@rmihael do you know the reason / case that this was useful?

@jorisvandenbossche
Copy link
Member

@rmihael to give some context, we reverted this PR in #21027 because it introduced a bug.

@rmihael
Copy link
Contributor Author

rmihael commented May 30, 2018

Sorry for the silence. I used dill to run multiprocess optimizations using the backtrader framework. I can use cloudpickle with the same success, so there is no need to add extra complexity to the codebase.

@jorisvandenbossche
Copy link
Member

no problem, thanks for answering!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Datetime Datetime data dtype Needs Discussion Requires discussion from core team before further action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants