Skip to content

Commit b2d977c

Browse files
add Column.from_sequence (#148)
Co-authored-by: MarcoGorelli <> Co-authored-by: Ralf Gommers <[email protected]>
1 parent e0d387f commit b2d977c

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed
Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,25 @@
1+
from __future__ import annotations
2+
3+
from typing import Sequence
4+
5+
from ._types import dtype
6+
17
class Column:
2-
pass
8+
@classmethod
9+
def from_sequence(cls, sequence: Sequence[object], dtype: dtype) -> Column:
10+
"""
11+
Construct Column from sequence of elements.
12+
13+
Parameters
14+
----------
15+
sequence : Sequence[object]
16+
Sequence of elements. Each element must be of the specified
17+
``dtype``, the corresponding Python builtin scalar type, or
18+
coercible to that Python scalar type.
19+
dtype : str
20+
Dtype of result. Must be specified.
21+
22+
Returns
23+
-------
24+
Column
25+
"""

0 commit comments

Comments
 (0)