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

[BUG] NotImplemented error for empty columns #9930

Closed
galipremsagar opened this issue Dec 17, 2021 · 0 comments · Fixed by #9937
Closed

[BUG] NotImplemented error for empty columns #9930

galipremsagar opened this issue Dec 17, 2021 · 0 comments · Fixed by #9937
Assignees
Labels
bug Something isn't working Python Affects Python cuDF API.

Comments

@galipremsagar
Copy link
Contributor

Describe the bug
There is a newly occurring error in dask_cudf with empty columns, where a max operation would result in NotImplemented error.

Steps/Code to reproduce bug

>>> import dask
>>> import pandas as pd
>>> df = pd.DataFrame({'src':[], 'dst':[], 'value':[]})
>>> import cudf
>>> gdf = cudf.from_pandas(df)
>>> import dask_cudf
>>> ddf = dask_cudf.from_cudf(gdf, npartitions=1)
>>> ddf
<dask_cudf.DataFrame | 1 tasks | 1 npartitions>
>>> max_verts = ddf[['src', 'dst']].max().max().compute()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/nvme/0/pgali/envs/cudfdev/lib/python3.8/site-packages/dask/base.py", line 288, in compute
    (result,) = compute(self, traverse=False, **kwargs)
  File "/nvme/0/pgali/envs/cudfdev/lib/python3.8/site-packages/dask/base.py", line 571, in compute
    results = schedule(dsk, keys, **kwargs)
  File "/nvme/0/pgali/envs/cudfdev/lib/python3.8/site-packages/dask/threaded.py", line 79, in get
    results = get_async(
  File "/nvme/0/pgali/envs/cudfdev/lib/python3.8/site-packages/dask/local.py", line 507, in get_async
    raise_exception(exc, tb)
  File "/nvme/0/pgali/envs/cudfdev/lib/python3.8/site-packages/dask/local.py", line 315, in reraise
    raise exc
  File "/nvme/0/pgali/envs/cudfdev/lib/python3.8/site-packages/dask/local.py", line 220, in execute_task
    result = _execute_task(task, data)
  File "/nvme/0/pgali/envs/cudfdev/lib/python3.8/site-packages/dask/core.py", line 119, in _execute_task
    return func(*(_execute_task(a, cache) for a in args))
  File "/nvme/0/pgali/envs/cudfdev/lib/python3.8/site-packages/dask/utils.py", line 37, in apply
    return func(*args, **kwargs)
  File "/nvme/0/pgali/envs/cudfdev/lib/python3.8/site-packages/dask/dataframe/core.py", line 6931, in _reduction_chunk
    return o.to_frame().T if is_series_like(o) else o
  File "/nvme/0/pgali/envs/cudfdev/lib/python3.8/site-packages/cudf/core/dataframe.py", line 3548, in transpose
    libcudf.transpose.transpose(self),
  File "cudf/_lib/transpose.pyx", line 43, in cudf._lib.transpose.transpose
NotImplementedError: Cannot transpose string columns
>>> 
@galipremsagar galipremsagar added bug Something isn't working Python Affects Python cuDF API. labels Dec 17, 2021
@galipremsagar galipremsagar self-assigned this Dec 17, 2021
@rapids-bot rapids-bot bot closed this as completed in #9937 Jan 4, 2022
rapids-bot bot pushed a commit that referenced this issue Jan 4, 2022
Fixes: #9930 

This PR enables string columns to transpose in cudf python.

Authors:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - Christopher Harris (https://github.com/cwharris)

URL: #9937
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant