We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
from mailing list. this is caused by the change in handling of None in PyObjectHashTable
PyObjectHashTable
import datetime import numpy import pandas def simple_test2(): data = [ [1, 'string1', 1.0], [2, 'string2', 2.0], [3, None, 3.0] ] df = pandas.DataFrame({'key': [x[0] for x in data], 'grouper': [x[1] for x in data], 'value': [x[2] for x in data]}) df['weights'] = df['value']/df['value'].sum() gb = df.groupby('grouper').aggregate(numpy.sum) print print df print '' print gb if __name__ == '__main__': simple_test2() 0.7rc1 yields: grouper key value weights 0 string1 1 1 0.1667 1 string2 2 2 0.3333 2 NaN 3 3 0.5000 key value weights grouper None 3 3 0.5000 string1 1 1 0.1667 string2 2 2 0.3333 0.7 final yields: grouper key value weights 0 string1 1 1 0.166667 1 string2 2 2 0.333333 2 None 3 3 0.500000 key value weights grouper string1 1 1 0.166667 string2 2 2 0.333333 missing the last line
The text was updated successfully, but these errors were encountered:
BUG: don't nuke None in Series.unique, GH #778
110be6f
Fixed Series.unique issue. groupby will be addressed by separate ticket #443
Sorry, something went wrong.
No branches or pull requests
from mailing list. this is caused by the change in handling of None in
PyObjectHashTable
The text was updated successfully, but these errors were encountered: