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

Add IndexedFrame class and move SingleColumnFrame to a separate module #9378

Merged
merged 12 commits into from
Oct 14, 2021
15 changes: 10 additions & 5 deletions python/.flake8
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@
exclude = __init__.py
ignore =
# line break before binary operator
W503
W503,
# whitespace before :
E203

[pydocstyle]
match = ^(.*abc\.py|types\.py)$
#match = ^(types\.py)$
match = ^(.*abc\.py|.*api/types\.py|.*single_column_frame\.py|.*indexed_frame\.py)$
# Due to https://github.com/PyCQA/pydocstyle/issues/363, we must exclude rather than include using match-dir.
match-dir = ^(?!ci|cpp|python/dask_cudf|python/cudf_kafka|python/custreamz).*$
# In addition to numpy style, we additionally ignore magic methods (D105) and newlines before docstrings (D204).
add-ignore = D105, D204
# In addition to numpy style, we additionally ignore:
add-ignore =
# magic methods
D105,
# no docstring in __init__
D107,
# newlines before docstrings
D204
3 changes: 2 additions & 1 deletion python/cudf/cudf/core/_internals/where.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
from cudf._typing import ColumnLike, ScalarLike
from cudf.core.column import ColumnBase
from cudf.core.dataframe import DataFrame
from cudf.core.frame import Frame, SingleColumnFrame
from cudf.core.frame import Frame
from cudf.core.index import Index
from cudf.core.series import Series
from cudf.core.single_column_frame import SingleColumnFrame


def _normalize_scalars(col: ColumnBase, other: ScalarLike) -> ScalarLike:
Expand Down
4 changes: 3 additions & 1 deletion python/cudf/cudf/core/column/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ def as_frame(self) -> "cudf.core.frame.Frame":
"""
Converts a Column to Frame
"""
return cudf.core.frame.SingleColumnFrame({None: self.copy(deep=False)})
return cudf.core.single_column_frame.SingleColumnFrame(
{None: self.copy(deep=False)}
)

@property
def data_array_view(self) -> "cuda.devicearray.DeviceNDArray":
Expand Down
Loading