-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[DataFrame] calling __delitem__ on the last column errors #2027
Copy link
Copy link
Closed
Labels
bugSomething that is supposed to be working; but isn'tSomething that is supposed to be working; but isn't
Description
This bug affects calling __setitem__ on the last column as well.
Code that causes the bug:
df = rdf.DataFrame({"col1": lrange(3), "col2": lrange(3)})
del df["col2"]Output:
Remote function ray.dataframe.utils._deploy_func failed with:
Traceback (most recent call last):
File "/home/peter/workspace/ray/python/ray/dataframe/utils.py", line 132, in _deploy_func
return func(dataframe, *args)
File "/home/peter/workspace/ray/python/ray/dataframe/dataframe.py", line 4728, in del_helper
cols = df.columns[to_delete] # either int or an array of ints
File "/home/peter/workspace/ray_env/lib/python3.6/site-packages/pandas/core/indexes/range.py", line 544, in __getitem__
return super_getitem(key)
File "/home/peter/workspace/ray_env/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 1754, in __getitem__
result = getitem(key)
IndexError: index 0 is out of bounds for axis 1 with size 0
You can inspect errors by running
ray.error_info()
If this driver is hanging, start a new one with
ray.init(redis_address="192.168.0.114:49682")
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething that is supposed to be working; but isn'tSomething that is supposed to be working; but isn't