Skip to content

BUG: Value error aggregate item by item #15083

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 4 commits into from
Closed

BUG: Value error aggregate item by item #15083

wants to merge 4 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 8, 2017

@ghost ghost changed the title Value error aggregate item by item BUG: Value error aggregate item by item Jan 8, 2017
a2 = [s, s, datetime.strptime('2016-12-28', "%Y-%m-%d"), 'asdf', 6]
num = np.array([a1, a2])
columns = ['b', 'c', 'd', 'e', 'f']
idx = [x for x in xrange(0, len(num))]
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps try changing this line to idx = range(len(num))?

@@ -772,6 +772,31 @@ def max_value(group):
'int64': 1}).sort_values()
assert_series_equal(result, expected)

def test_groupby_aggregate_item_by_item(self):
def test_df():
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be a much simpler construction of a test data frame

def x():
df.groupby(["e_idx", "e"])["a"].quantile(what)
self.assertRaisesRegexp(ValueError,
"'SeriesGroupBy' object "
Copy link
Contributor

Choose a reason for hiding this comment

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

this is not any more useful

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

not really sure what you are trying to solve here. This is just changing one error for another, not actually fixing the issue.

@jreback jreback added Error Reporting Incorrect or improved errors from pandas Groupby labels Jan 9, 2017
@ghost
Copy link
Author

ghost commented Jan 9, 2017

Closing this pull request since it does not resolve the issue.

@ghost ghost closed this Jan 9, 2017
@ghost ghost deleted the value_error__aggregate_item_by_item branch January 9, 2017 18:22
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas Groupby
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unclear ValueError on core.groupby
3 participants