Skip to content
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

del df[k] fails for a non-unique key #2347

ghost opened this issue Nov 24, 2012 · 0 comments · Fixed by #2349


Copy link

commented Nov 24, 2012

import pandas as pd

/home/user1/src/pandas/pandas/core/ in _delete_from_block(self, i, item)
    971         """
    972         block = self.blocks.pop(i)
--> 973         new_left, new_right = block.split_block_at(item)
    975         if new_left is not None:

/home/user1/src/pandas/pandas/core/ in split_block_at(self, item)
    195             return None, None
--> 197         if loc == 0:
    198             # at front
    199             left_block = None

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

@wesm wesm closed this in 0e942cc Nov 25, 2012

wesm added a commit that referenced this issue Nov 25, 2012
Merge remote branch 'y-p/fix_pop_with_dupe_columns'
* y-p/fix_pop_with_dupe_columns:
  DOC: docstring of Index.get_loc, clarify return type
  TST: split_block_at() after changes
  BUG: deletion of non-unique column. closes #2347
  TST: add tests for com.split_ranges()
  ENH: add com.split_ranges util function
  TST: df.pop() of non-unique column
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.