Skip to content

Commit aa732ff

Browse files
committed
add some more dtypes
1 parent d10e22a commit aa732ff

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

spec/API_specification/dataframe_api/__init__.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
from __future__ import annotations
55

6-
from typing import Mapping, Sequence, Any
6+
from typing import Mapping, Sequence, Any, Literal
77

88
from .column_object import *
99
from .dataframe_object import DataFrame
@@ -177,3 +177,25 @@ class Float32:
177177

178178
class Bool:
179179
"""Boolean type with 8 bits of precision."""
180+
181+
class Datetime:
182+
"""
183+
Datetime type with 64 bits of precision.
184+
185+
Attributes
186+
----------
187+
time_unit : Literal['ms', 'us', 'ns']
188+
Precision of the datetime type.
189+
time_zone : str | None
190+
Time zone of the datetime type. Only IANA time zones are supported.
191+
`None` indicates time-zone-naive data.
192+
"""
193+
time_unit: Literal['ms', 'us', 'ns']
194+
time_zone: str | None # Only IANA time zones are supported
195+
196+
class Duration:
197+
"""Duration type with 64 bits of precision."""
198+
time_unit: Literal['ms', 'us', 'ns']
199+
200+
class String:
201+
"""String type."""

spec/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
('py:class', 'array'),
7676
('py:class', 'DataFrame'),
7777
('py:class', 'device'),
78-
('py:class', 'DType'),
78+
('py:class', 'DTypeT'),
7979
('py:class', 'NestedSequence'),
8080
('py:class', 'collections.abc.Sequence'),
8181
('py:class', 'PyCapsule'),

0 commit comments

Comments
 (0)