NVIDIA / NVIDIA/cudf

[BUG]: `cudf.concat([empty DataFrame, empty DataFrame])` does not resolve axis types

Open
#16,550 0 comments 0 reactions 0 assignees View on GitHub
bug Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

**Describe the bug**
Currently `concat` short-circuits too early when detecting all empty `DataFrame` objects and just `return cudf.DataFrame()`. The empty DataFrames may have `.index` and `.column` types that need to be "concatenated" i.e. resolved to a new `Index` subclass

**Steps/Code to reproduce bug**
```python
In [8]: pd.concat([pd.DataFrame(), pd.DataFrame(index=pd.DatetimeIndex([]))], axis=1).index
Out[8]: Index([], dtype='object')

In [9]: cudf.concat([cudf.DataFrame(), cudf.DataFrame(index=cudf.DatetimeIndex([]))], axis=1).index
Out[9]: RangeIndex(start=0, stop=0, step=1)
```

**Expected behavior**
`Out[9]` should be `Out[8]`

**Environment overview (please complete the following information)**
- Environment location: Bare-metal
- Method of cuDF install: from source

**Environment details**
Please run and paste the output of the `cudf/print_env.sh` script here, to gather any other relevant environment details

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.