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
Am trying to iterate over elements in a subgroup of a data frame and get a keyerror:
(Pdb) [x for x in group.ix] *** KeyError: 0 (Pdb) len(group) 7
Element-wise iteration over the parent data frame works fine.
The text was updated successfully, but these errors were encountered:
What elements? What you wrote is not a supported part of the API:
[x for x in group.ix]
I'm actually surprised that works anywhere (I guess it works by accident)
Sorry, something went wrong.
If you want to iterate over the rows (as Series objects), I'm adding a method to do it. In the meantime, you can do;
for k in group.index: x = group.xs(k)
The new DataFrame.iterrows iterator (in the current revision, will be part of the 0.7.0 release) does that you're looking for I believe.
DataFrame.iterrows
Merge pull request pandas-dev#550 from manahl/setup_py_conda_env
9f2d5c0
MacOS Fix build with conda gcc
No branches or pull requests
Am trying to iterate over elements in a subgroup of a data frame and get a keyerror:
Element-wise iteration over the parent data frame works fine.
The text was updated successfully, but these errors were encountered: