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
>>> df1 = pd.DataFrame( { "Name" : ["Alice", "Bob", "Mallory", "Mallory", "Bob" , "Mallory"] , "City" : ["Seattle", "Seattle", "Portland", "Seattle", "Seattle", "Portland"] } ) >>> g1 = df1.groupby( [ "Name" ] ) >>> print g1.head() City Name Name Alice 0 Seattle Alice Bob 1 Seattle Bob 4 Seattle Bob Mallory 2 Portland Mallory 3 Seattle Mallory 5 Portland Mallory >>>> pd.DataFrame(g1)
raise exception AttributeError: 'numpy.ndarray' object has no attribute 'index'
The text was updated successfully, but these errors were encountered:
pls have a look at the docs, a GroupBy object is only an intermediary step. you need to apply something to it. http://pandas.pydata.org/pandas-docs/dev/groupby.html
GroupBy
maybe you are looking for set_index?
set_index
Sorry, something went wrong.
closing as not a bug
No branches or pull requests
raise exception
AttributeError: 'numpy.ndarray' object has no attribute 'index'
The text was updated successfully, but these errors were encountered: