Skip to content

BUG: DatetimeIndex.__iter__ creates a temp array of Timestamp (GH7683) #7702

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

Conversation

yrlihuan
Copy link
Contributor

@yrlihuan yrlihuan commented Jul 9, 2014

closes #7683

@jreback
Copy link
Contributor

jreback commented Jul 9, 2014

needs:

  • tests
  • release note needs to go in v0.15.0.txt
  • needs a vbench (in vb_suite)

@jreback jreback added this to the 0.15.0 milestone Jul 9, 2014
@sinhrks
Copy link
Member

sinhrks commented Jul 9, 2014

Better to add DatetimeIndexOpsMixin in base.py, and remove __iter__ from DatetimeIndex and PeriodIndex.

@yrlihuan
Copy link
Contributor Author

yrlihuan commented Jul 9, 2014

DatetimeIndex behaves a bit differently from PeriodIndex when boxing. Instead of passing raw values into _box_func, it firstly reinterprets them as integers (asi8). Could this be made consistent?

@sinhrks
Copy link
Member

sinhrks commented Jul 9, 2014

Believe so like DatetimeIndexOpsMixin.asobject (and _box_values) does. PeriodIndex._box_func should accept asi8 and return correct object representation.

@yrlihuan yrlihuan closed this Jul 9, 2014
@jreback
Copy link
Contributor

jreback commented Jul 9, 2014

@yrlihuan I see you did a new PR, that's fine, normally you don't need to do that though (just update the existing on), making sure you force push

see here: https://github.com/pydata/pandas/wiki/Using-Git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.iterrows takes too long and generate large memory footprint
3 participants