-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
observed
keyword for SeriesGroupBy Ignored
#24880
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
Comments
Hmm OK thanks for the report. Something must be going awry with the In [20]: df.groupby(['a','b'], observed=True).c.sum()
Out[20]:
a b
x a 7
b 8
y a 9
Name: c, dtype: int64
In [21]: df.groupby(['a','b'], observed=False).c.sum()
Out[21]:
a b
x a 7
b 8
y a 9
Name: c, dtype: int64 Investigation and PRs would certainly be welcome |
observed
keyword for SeriesGroupBy Ignored
check this on master |
Confirmed on master |
This was referenced May 19, 2019
This issue still persists in pandas 0.25.3. I had asked about this on Stackoverflow and got here, but found this is closed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code Sample, a copy-pastable example if possible
Problem description
The calculated
result1
andresult2
DataFrames are different.Result1:
Result2
Expected Output
I expect that both results have 4 rows, as the
observed
option isFalse
by default.Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: