-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
PERF: Faster Series construction with no data and DatetimeIndex. #11598
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
PERF: Faster Series construction with no data and DatetimeIndex. #11598
Conversation
lgtm. add a whatsnew note (perf section). |
ping when note added, ready, and green. |
d5e44b4
to
18715b0
Compare
done, done, and done ;) |
elif isinstance(index, PeriodIndex): | ||
data = [data.get(i, nan) for i in index] | ||
if len(data): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make these 1-liners (and in except
data = [ data.get(i, np.nan) for i in index ] if len(data) else np.nan
minor comments, ping when green. |
ref pandas-dev#11433 Code. taken from @jreback comment on pandas-dev#11433
18715b0
to
20511dd
Compare
changes made, waiting for Travis again |
green. ping @jreback |
…ct_no_values PERF: Faster Series construction with no data and DatetimeIndex.
thanks! |
closes #11433
Code. taken from @jreback comment on #11433
asv benchmark: