Skip to content

[BUG] Default type of empty list for Index should be object dtype #14091

Closed

Description

Describe the bug
When an empty list is passed to Index constructor cudf defaults to float64, whereas pandas defaults to object. We should match the same.

Steps/Code to reproduce bug

In [1]: import cudf

In [2]: cudf.Index([])
Out[2]: Float64Index([], dtype='float64')

In [3]: import pandas as pd

In [4]: pd.Index([])
Out[4]: Index([], dtype='object')

Expected behavior

In [4]: cudf.Index([])
Out[4]: StringIndex([], dtype='object')

Environment overview (please complete the following information)

  • Environment location: [Bare-metal]
  • Method of cuDF install: [from source]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

PythonAffects Python cuDF API.bugSomething isn't working

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions