Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions spec/API_specification/dataframe_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def concat(dataframes: Sequence[DataFrame]) -> DataFrame:
"""
...

def column_from_sequence(sequence: Sequence[Any], *, name: str | None, dtype: Any) -> Column[Any]:
def column_from_sequence(sequence: Sequence[Any], *, dtype: Any, name: str = '') -> Column[Any]:
"""
Construct Column from sequence of elements.

Expand Down Expand Up @@ -108,7 +108,7 @@ def dataframe_from_dict(data: Mapping[str, Column[Any]]) -> DataFrame:
...


def column_from_1d_array(array: Any, *, name: str, dtype: Any) -> Column[Any]:
def column_from_1d_array(array: Any, *, dtype: Any, name: str = '') -> Column[Any]:
"""
Construct Column from 1D array.

Expand All @@ -122,7 +122,7 @@ def column_from_1d_array(array: Any, *, name: str, dtype: Any) -> Column[Any]:
----------
array : array
array-API compliant 1D array
name : str
name : str, optional
Name to give columns.
dtype : DType
Dtype of column.
Expand Down
4 changes: 2 additions & 2 deletions spec/API_specification/dataframe_api/column_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def column(self) -> Any:
...

@property
def name(self) -> str | None:
def name(self) -> str:
"""Return name of column."""

def __len__(self) -> int:
Expand Down Expand Up @@ -711,7 +711,7 @@ def to_array_object(self, dtype: Any) -> Any:
``array-api-compat`` package to convert it to a Standard-compliant array.
"""

def rename(self, name: str | None) -> Column[DType]:
def rename(self, name: str) -> Column[DType]:
"""
Rename column.

Expand Down