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

BUG: Period and Series/Index comparison raises TypeError #13200

Closed
wants to merge 1 commit into from

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented May 17, 2016

  • tests added / passed
  • passes git diff upstream/master | flake8 --diff
  • whatsnew entry
    Period and Series/Index comparison raises TypeError if Period is on left hand side.
# OK
pd.Series([pd.Period('2011-01-01', freq='D')]) > pd.Period('2011-01-01', freq='D')
#0    False
# dtype: bool

# NG
pd.Period('2011-01-01', freq='D') > pd.Series([pd.Period('2011-01-01', freq='D')])
# TypeError: Cannot compare type 'Period' with type 'Series'

@sinhrks sinhrks added Bug Numeric Operations Arithmetic, Comparison, and Logical operations Period Period data type labels May 17, 2016
@sinhrks sinhrks added this to the 0.18.2 milestone May 17, 2016
@jreback jreback mentioned this pull request May 17, 2016
7 tasks
@jreback
Copy link
Contributor

jreback commented May 17, 2016

lgtm. merge on green (or you can ping and i can).

@jreback
Copy link
Contributor

jreback commented May 17, 2016

thanks!

@jreback jreback closed this in 00e0f3e May 17, 2016
@sinhrks sinhrks deleted the period_comp branch May 17, 2016 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Numeric Operations Arithmetic, Comparison, and Logical operations Period Period data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants