Skip to content

Commit eacc116

Browse files
committed
remove dtype from column_from_1d_array
1 parent e362b88 commit eacc116

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

spec/API_specification/dataframe_api/__init__.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def dataframe_from_columns(*columns: Column) -> DataFrame:
112112
...
113113

114114

115-
def column_from_1d_array(array: Any, *, dtype: DType, name: str = '') -> Column:
115+
def column_from_1d_array(array: Any, *, name: str = '') -> Column:
116116
"""
117117
Construct Column from 1D array.
118118
@@ -122,14 +122,27 @@ def column_from_1d_array(array: Any, *, dtype: DType, name: str = '') -> Column:
122122
Cross-kind casting is undefined and may vary across implementations.
123123
Downcasting is disallowed.
124124
125+
The resulting column will have the dtype to the
126+
Array API one:
127+
128+
- 'bool' -> Bool()
129+
- 'int8' -> Int8()
130+
- 'int16' -> Int16()
131+
- 'int32' -> Int32()
132+
- 'int64' -> Int64()
133+
- 'uint8' -> UInt8()
134+
- 'uint16' -> UInt16()
135+
- 'uint32' -> UInt32()
136+
- 'uint64' -> UInt64()
137+
- 'float32' -> Float32()
138+
- 'float64' -> Float64()
139+
125140
Parameters
126141
----------
127142
array : array
128143
array-API compliant 1D array
129144
name : str, optional
130145
Name to give columns.
131-
dtype : DType
132-
Dtype of column.
133146
134147
Returns
135148
-------

0 commit comments

Comments
 (0)