datatable.time.month()¶
Added in version 1.0.0
Retrieve the “month” component of a date32 or time64 column.
Parameters¶
date
FExpr[date32]
| FExpr[time64]
A column for which you want to compute the month part.
return
FExpr[int32]
The month part of the source column.
Examples¶
DT = dt.Frame([1, 1000, 100000], stype='date32')
DT[:, {'date': f[0], 'month': dt.time.month(f[0])}]
date | month | ||
---|---|---|---|
date32 | int32 | ||
0 | 1970-01-02 | 1 | |
1 | 1972-09-27 | 9 | |
2 | 2243-10-17 | 10 |
The content on this page is licensed under the Creative Commons Attribution 4.0 License
(CC BY 4.0) ,
and code samples are licensed under the MIT License.