Skip to content

Commit 56f56a7

Browse files
authored
remove some unnecessary api_version args (#264)
1 parent 5099086 commit 56f56a7

File tree

1 file changed

+4
-32
lines changed

1 file changed

+4
-32
lines changed

spec/API_specification/dataframe_api/__init__.py

+4-32
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def concat(dataframes: Sequence[DataFrame]) -> DataFrame:
6666
"""
6767
...
6868

69-
def column_from_sequence(sequence: Sequence[Any], *, dtype: DType, name: str = '', api_version: str | None = None) -> Column:
69+
def column_from_sequence(sequence: Sequence[Any], *, dtype: DType, name: str = '') -> Column:
7070
"""
7171
Construct Column from sequence of elements.
7272
@@ -80,21 +80,14 @@ def column_from_sequence(sequence: Sequence[Any], *, dtype: DType, name: str = '
8080
Name of column.
8181
dtype : DType
8282
Dtype of result. Must be specified.
83-
api_version: str | None
84-
A string representing the version of the dataframe API specification
85-
in ``'YYYY.MM'`` form, for example, ``'2023.04'``.
86-
If it is ``None``, it should return an object corresponding to
87-
latest version of the dataframe API specification. If the given
88-
version is invalid or not implemented for the given module, an
89-
error should be raised. Default: ``None``.
9083
9184
Returns
9285
-------
9386
Column
9487
"""
9588
...
9689

97-
def dataframe_from_dict(data: Mapping[str, Column], *, api_version: str | None = None) -> DataFrame:
90+
def dataframe_from_dict(data: Mapping[str, Column]) -> DataFrame:
9891
"""
9992
Construct DataFrame from map of column names to Columns.
10093
@@ -104,13 +97,6 @@ def dataframe_from_dict(data: Mapping[str, Column], *, api_version: str | None =
10497
Column must be of the corresponding type of the DataFrame.
10598
For example, it is only supported to build a ``LibraryXDataFrame`` using
10699
``LibraryXColumn`` instances.
107-
api_version: str | None
108-
A string representing the version of the dataframe API specification
109-
in ``'YYYY.MM'`` form, for example, ``'2023.04'``.
110-
If it is ``None``, it should return an object corresponding to
111-
latest version of the dataframe API specification. If the given
112-
version is invalid or not implemented for the given module, an
113-
error should be raised. Default: ``None``.
114100
115101
Returns
116102
-------
@@ -126,7 +112,7 @@ def dataframe_from_dict(data: Mapping[str, Column], *, api_version: str | None =
126112
...
127113

128114

129-
def column_from_1d_array(array: Any, *, dtype: DType, name: str = '', api_version: str | None = None) -> Column:
115+
def column_from_1d_array(array: Any, *, dtype: DType, name: str = '') -> Column:
130116
"""
131117
Construct Column from 1D array.
132118
@@ -144,21 +130,14 @@ def column_from_1d_array(array: Any, *, dtype: DType, name: str = '', api_versio
144130
Name to give columns.
145131
dtype : DType
146132
Dtype of column.
147-
api_version: str | None
148-
A string representing the version of the dataframe API specification
149-
in ``'YYYY.MM'`` form, for example, ``'2023.04'``.
150-
If it is ``None``, it should return an object corresponding to
151-
latest version of the dataframe API specification. If the given
152-
version is invalid or not implemented for the given module, an
153-
error should be raised. Default: ``None``.
154133
155134
Returns
156135
-------
157136
Column
158137
"""
159138
...
160139

161-
def dataframe_from_2d_array(array: Any, *, names: Sequence[str], dtypes: Mapping[str, Any], api_version: str | None = None) -> DataFrame:
140+
def dataframe_from_2d_array(array: Any, *, names: Sequence[str], dtypes: Mapping[str, Any]) -> DataFrame:
162141
"""
163142
Construct DataFrame from 2D array.
164143
@@ -176,13 +155,6 @@ def dataframe_from_2d_array(array: Any, *, names: Sequence[str], dtypes: Mapping
176155
Names to give columns. Must be the same length as ``array.shape[1]``.
177156
dtypes : Mapping[str, DType]
178157
Dtype of each column. Must be the same length as ``array.shape[1]``.
179-
api_version: str | None
180-
A string representing the version of the dataframe API specification
181-
in ``'YYYY.MM'`` form, for example, ``'2023.04'``.
182-
If it is ``None``, it should return an object corresponding to
183-
latest version of the dataframe API specification. If the given
184-
version is invalid or not implemented for the given module, an
185-
error should be raised. Default: ``None``.
186158
187159
Returns
188160
-------

0 commit comments

Comments
 (0)