-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed

Description
import pandas as pd
df=pd.DataFrame({0:[0,1],1:[0,1],2:[4,5]})
df.columns=["a","b","a"]
res=df.pop("a")
...
/home/user1/src/pandas/pandas/core/internals.py in _delete_from_block(self, i, item)
971 """
972 block = self.blocks.pop(i)
--> 973 new_left, new_right = block.split_block_at(item)
974
975 if new_left is not None:
/home/user1/src/pandas/pandas/core/internals.py in split_block_at(self, item)
195 return None, None
196
--> 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()