-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: add dropna argument to pivot_table #4106
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
Conversation
Question: Why did you choose |
@jtratner whoops! |
I've also realised that doing something like |
@hayd |
ah didn't realize it was a multiindex. (internal representation is an empty ndarray) |
imo len(some_multiindex) should behave as if some_multiindex is a 2d array. |
any reason why that shouldn't be the case? |
|
I think it needs to be: def __len__(self):
return len(self.levels) * len(self.labels) |
That way |
that doesn't match def __len__(self):
return len(self.values) |
e.g., if there are 10 level and 10 labels then |
Oh, I thought len(self.labels) * len(self.levels) was equal to On Tue, Jul 2, 2013 at 9:09 PM, Phillip Cloud [email protected]:
|
Nope, I'm wrong :P On Tue, Jul 2, 2013 at 9:22 PM, Jeffrey Tratner
|
@cpcloud no reason really... I was away from the internet when wrote the test case and forgot what it was. |
Converted test case to example from previous issue. cartesian_product is slightly slower (when passing to MultIndex) for small inputs but considerably faster for large ones:
|
merge? |
ENH: add dropna argument to pivot_table
fixes #3820
Also same argument for
pivot_table
.