Skip to content

BUG: PeriodIndex constructor doesn't work with Series objects #7712

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
Jul 10, 2014
Merged

BUG: PeriodIndex constructor doesn't work with Series objects #7712

merged 1 commit into from
Jul 10, 2014

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Jul 9, 2014

closes #7701

@cpcloud
Copy link
Member Author

cpcloud commented Jul 9, 2014

@jreback i think this should go in 0.14.1, since this is a bug

found this updating the examples in wes's book

@jreback
Copy link
Contributor

jreback commented Jul 9, 2014

is this #7701 ? (which @jorisvandenbossche beat you to it!)

@jreback jreback added this to the 0.14.1 milestone Jul 9, 2014
@jreback
Copy link
Contributor

jreback commented Jul 9, 2014

releas note & can you indicate the issue in the test? squash and looks ok, ping when passes

@jreback
Copy link
Contributor

jreback commented Jul 9, 2014

@cpcloud side issue: https://travis-ci.org/pydata/pandas/jobs/29543656

prob just need to add that error code tot he network decorator?

@cpcloud
Copy link
Member Author

cpcloud commented Jul 9, 2014

yeah not sure, all urlerrors should be caught because they're a subclass of one of hte classes that network checks ... i'll see if i can't find out what the issue is

@jreback
Copy link
Contributor

jreback commented Jul 9, 2014

pushed this: 66e1763

rebase and give it a whilrl

@jreback
Copy link
Contributor

jreback commented Jul 10, 2014

@cpcloud can you update?

@cpcloud
Copy link
Member Author

cpcloud commented Jul 10, 2014

updated ... waiting on travis

@cpcloud cpcloud self-assigned this Jul 10, 2014
@@ -1281,6 +1281,15 @@ def test_constructor_nat(self):
self.assertRaises(
ValueError, period_range, start='2011-01-01', end='NaT', freq='M')

def test_constructor_year_and_quarter(self):
year = pd.Series([2001, 2002, 2003])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add the issue number here?

@jreback
Copy link
Contributor

jreback commented Jul 10, 2014

minor comment, pls squash and merge (travis already passed, so good 2 go)

@cpcloud
Copy link
Member Author

cpcloud commented Jul 10, 2014

alright i'll add some docs and then merge it

@jreback
Copy link
Contributor

jreback commented Jul 10, 2014

oh....doesn't really need any docs, just the issue number on the test (well maybe the doc-string might need to be verified)

@cpcloud
Copy link
Member Author

cpcloud commented Jul 10, 2014

oh ok ... i've already added a bug fix in v0.14.1.txt

@cpcloud
Copy link
Member Author

cpcloud commented Jul 10, 2014

a bug fix doc note i should say

cpcloud added a commit that referenced this pull request Jul 10, 2014
BUG: PeriodIndex constructor doesn't work with Series objects
@cpcloud cpcloud merged commit 7707a20 into pandas-dev:master Jul 10, 2014
@cpcloud cpcloud deleted the period-index-constructor branch July 10, 2014 15:15
@jorisvandenbossche
Copy link
Member

@cpcloud as an aftermath, can you also update the docstring of PeriodIndex? (it actually says only 'array' and not series)

@cpcloud
Copy link
Member Author

cpcloud commented Jul 10, 2014

sure :) aftermath 🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Dtype Conversions Unexpected or buggy dtype conversions Period Period data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PeriodIndex construction with Series (for year, quarter) give TypeError
3 participants