diff --git a/docs/cudf/source/conf.py b/docs/cudf/source/conf.py index c3c14ac8cad..f544536fb31 100644 --- a/docs/cudf/source/conf.py +++ b/docs/cudf/source/conf.py @@ -556,6 +556,7 @@ def on_missing_reference(app, env, node, contnode): ("py:class", "Dtype"), # The following are erroneously warned due to # https://github.com/sphinx-doc/sphinx/issues/11225 + ("py:obj", "cudf.Index.values_host"), ("py:class", "pa.Array"), ("py:class", "ScalarLike"), ("py:class", "ParentType"), diff --git a/python/cudf/cudf/core/index.py b/python/cudf/cudf/core/index.py index 73b7298410a..1c48b8f4f2d 100644 --- a/python/cudf/cudf/core/index.py +++ b/python/cudf/cudf/core/index.py @@ -78,6 +78,11 @@ class IndexMeta(type): """Custom metaclass for Index that overrides instance/subclass tests.""" def __call__(cls, data, *args, **kwargs): + if kwargs.get("tupleize_cols", True) is not True: + raise NotImplementedError( + "tupleize_cols is currently not supported." + ) + if cls is Index: return as_index( arbitrary=data, @@ -997,21 +1002,23 @@ def __dask_tokenize__(self): class Index(SingleColumnFrame, BaseIndex, metaclass=IndexMeta): """ - An array of orderable values that represent the indices of another Column + Immutable sequence used for indexing and alignment. - Attributes - ---------- - _values: A Column object - name: A string + The basic object storing axis labels for all pandas objects. Parameters ---------- - data : Column - The Column of data for this index - name : str optional - The name of the Index. If not provided, the Index adopts the value - Column's name. Otherwise if this name is different from the value - Column's, the data Column will be cloned to adopt this name. + data : array-like (1-dimensional) + dtype : str, numpy.dtype, or ExtensionDtype, optional + Data type for the output Index. If not specified, this will be + inferred from `data`. + copy : bool, default False + Copy input data. + name : object + Name to be stored in the index. + tupleize_cols : bool (default: True) + When True, attempt to create a MultiIndex if possible. + Currently not supported. """ @_performance_tracking @@ -1735,8 +1742,18 @@ def __init__( if tz is not None: raise NotImplementedError("tz is not yet supported") if normalize is not False: + warnings.warn( + "The 'normalize' keyword is " + "deprecated and will be removed in a future version. ", + FutureWarning, + ) raise NotImplementedError("normalize == True is not yet supported") if closed is not None: + warnings.warn( + "The 'closed' keyword is " + "deprecated and will be removed in a future version. ", + FutureWarning, + ) raise NotImplementedError("closed is not yet supported") if ambiguous != "raise": raise NotImplementedError("ambiguous is not yet supported") @@ -2480,6 +2497,14 @@ def __init__( if freq is not None: raise NotImplementedError("freq is not yet supported") + if closed is not None: + warnings.warn( + "The 'closed' keyword is " + "deprecated and will be removed in a future version. ", + FutureWarning, + ) + raise NotImplementedError("closed is not yet supported") + if unit is not None: warnings.warn( "The 'unit' keyword is " @@ -2863,6 +2888,7 @@ def __init__( dtype=None, copy: bool = False, name=None, + verify_integrity: bool = True, ): name = _getdefault_name(data, name=name) diff --git a/python/cudf/cudf/core/multiindex.py b/python/cudf/cudf/core/multiindex.py index ff4b06c6334..dfc596bf279 100644 --- a/python/cudf/cudf/core/multiindex.py +++ b/python/cudf/cudf/core/multiindex.py @@ -150,7 +150,7 @@ def __init__( dtype=None, copy=False, name=None, - **kwargs, + verify_integrity=True, ): if sortorder is not None: raise NotImplementedError("sortorder is not yet supported")