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

0.17 changes behavior of division of DataFrame by Series in presence of DateTimeIndex #11336

Closed
twiecki opened this issue Oct 15, 2015 · 5 comments

Comments

@twiecki
Copy link
Contributor

twiecki commented Oct 15, 2015

Older versions up to 0.16.2:

import pandas as pd
print(pd.__version__)
index = pd.date_range(start='2000-1-1', end='2000-1-3')
pd.DataFrame({1: [3, 3, 3], 2: [6, 6, 6]}, index=index) / pd.Series([2, 2, 2], index=index)
0.14.0rc1-33-g8c1f550
1   2
2000-01-01  1.5 3
2000-01-02  1.5 3
2000-01-03  1.5 3

0.17:

0.17.0
2000-01-01 00:00:00 2000-01-02 00:00:00 2000-01-03 00:00:00 1   2
2000-01-01  NaN NaN NaN NaN NaN
2000-01-02  NaN NaN NaN NaN NaN
2000-01-03  NaN NaN NaN NaN NaN

Work-around:
Use df.divide(series, axis='index').

Is this change in API intentional? Couldn't find it in the release announcements.

@TomAugspurger
Copy link
Contributor

Looks like this deprecation on automatic time-series broadcasting, from #2304

@jreback
Copy link
Contributor

jreback commented Oct 15, 2015

@twiecki this is as expected and has a specific mention in the whatsnew here

this was a DeprecationWarning since 0.8.0 FYI

@twiecki
Copy link
Contributor Author

twiecki commented Oct 15, 2015

Thanks @jreback. Never noticed the warning.

@jreback
Copy link
Contributor

jreback commented Oct 16, 2015

@twiecki yep. It has been around for quite a long time. Finally got around to removing it :)

@twiecki
Copy link
Contributor Author

twiecki commented Oct 16, 2015

I have full confidence that it was the right move :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants