Create instance of timestamp type with resolution and optional time zone.
str
one of âsâ [second], âmsâ [millisecond], âusâ [microsecond], or ânsâ [nanosecond]
str
, default None
Time zone name. None indicates time zone naive
TimestampType
Examples
Create an instance of timestamp type:
>>> import pyarrow as pa >>> pa.timestamp('us') TimestampType(timestamp[us]) >>> pa.timestamp('s', tz='America/New_York') TimestampType(timestamp[s, tz=America/New_York]) >>> pa.timestamp('s', tz='+07:30') TimestampType(timestamp[s, tz=+07:30])
Use timestamp type when creating a scalar object:
>>> from datetime import datetime >>> pa.scalar(datetime(2012, 1, 1), type=pa.timestamp('s', tz='UTC')) <pyarrow.TimestampScalar: '2012-01-01T00:00:00+0000'> >>> pa.scalar(datetime(2012, 1, 1), type=pa.timestamp('us')) <pyarrow.TimestampScalar: '2012-01-01T00:00:00.000000'>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4