diff --git a/python/cudf/cudf/_lib/table.pxd b/python/cudf/cudf/_lib/table.pxd deleted file mode 100644 index 015fd557723..00000000000 --- a/python/cudf/cudf/_lib/table.pxd +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. - -from libcpp.memory cimport unique_ptr - -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport mutable_table_view, table_view - - -cdef table_view table_view_from_columns(columns) except * -cdef table_view table_view_from_table(tbl, ignore_index=*) except* diff --git a/python/cudf/cudf/_lib/table.pyi b/python/cudf/cudf/_lib/table.pyi deleted file mode 100644 index ccf0eab99dc..00000000000 --- a/python/cudf/cudf/_lib/table.pyi +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2021, NVIDIA CORPORATION. - -from typing import TYPE_CHECKING, Any, List, Optional - -import cudf - -class Table(object): - _data: cudf.core.column_accessor.ColumnAccessor - _index: Optional[cudf.core.index.BaseIndex] - - def __init__(self, data: object = None, index: object = None) -> None: ... - - @property - def _num_columns(self) -> int: ... - - @property - def _num_indices(self) -> int: ... - - @property - def _num_rows(self) -> int: ... - - @property - def _column_names(self) -> List[Any]: ... - - @property - def _index_names(self) -> List[Any]: ... - - @property - def _columns(self) -> List[Any]: ... # TODO: actually, a list of columns diff --git a/python/cudf/cudf/_lib/table.pyx b/python/cudf/cudf/_lib/table.pyx deleted file mode 100644 index 14cab334e36..00000000000 --- a/python/cudf/cudf/_lib/table.pyx +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) 2020, NVIDIA CORPORATION. - -import itertools - -import numpy as np - -from cython.operator cimport dereference -from libc.stdint cimport uintptr_t -from libcpp.memory cimport unique_ptr -from libcpp.utility cimport move -from libcpp.vector cimport vector - -from cudf._lib.column cimport Column -from cudf._lib.cpp.column.column cimport column -from cudf._lib.cpp.column.column_view cimport column_view, mutable_column_view -from cudf._lib.cpp.table.table cimport table -from cudf._lib.cpp.table.table_view cimport mutable_table_view, table_view -from cudf._lib.cpp.types cimport size_type - -import cudf - - -cdef table_view table_view_from_columns(columns) except*: - """Create a cudf::table_view from an iterable of Columns.""" - cdef vector[column_view] column_views - - cdef Column col - for col in columns: - column_views.push_back(col.view()) - - return table_view(column_views) - - -cdef table_view table_view_from_table(tbl, ignore_index=False) except*: - """Create a cudf::table_view from a Table. - - Parameters - ---------- - ignore_index : bool, default False - If True, don't include the index in the columns. - """ - return table_view_from_columns( - tbl._index._data.columns + tbl._data.columns - if not ignore_index and tbl._index is not None - else tbl._data.columns - ) diff --git a/python/cudf/cudf/core/frame.py b/python/cudf/cudf/core/frame.py index 3bdb00dd723..e5fbd23407e 100644 --- a/python/cudf/cudf/core/frame.py +++ b/python/cudf/cudf/core/frame.py @@ -98,7 +98,7 @@ def _column_names(self) -> List[Any]: # TODO: List[str]? @property def _index_names(self) -> List[Any]: # TODO: List[str]? # TODO: Temporarily suppressing mypy warnings to avoid introducing bugs - # by returning an empty list if one is not expected. + # by returning an empty list where one is not expected. return ( None # type: ignore if self._index is None