用法:
classmethod Timestamp.today(cls, tz=None)
返回本地時區的當前時間。這與 datetime.today() 的不同之處在於它可以本地化到傳遞的時區。
- tz:str 或時區對象,默認無
本地化的時區。
參數:
例子:
>>> pd.Timestamp.today() Timestamp('2020-11-16 22:37:39.969883')
類似於
pd.NaT
:>>> pd.NaT.today() NaT
相關用法
- Python pandas.Timestamp.to_numpy用法及代碼示例
- Python pandas.Timestamp.to_period用法及代碼示例
- Python pandas.Timestamp.to_pydatetime用法及代碼示例
- Python pandas.Timestamp.to_julian_date用法及代碼示例
- Python pandas.Timestamp.timestamp用法及代碼示例
- Python pandas.Timestamp.tz_convert用法及代碼示例
- Python pandas.Timestamp.tz用法及代碼示例
- Python pandas.Timestamp.tz_localize用法及代碼示例
- Python pandas.Timestamp.dayofweek用法及代碼示例
- Python pandas.Timestamp.dayofyear用法及代碼示例
- Python pandas.Timestamp.strftime用法及代碼示例
- Python pandas.Timestamp.month_name用法及代碼示例
- Python pandas.Timestamp.ceil用法及代碼示例
- Python pandas.Timestamp.days_in_month用法及代碼示例
- Python pandas.Timestamp.asm8用法及代碼示例
- Python pandas.Timestamp.is_quarter_end用法及代碼示例
- Python pandas.Timestamp.daysinmonth用法及代碼示例
- Python pandas.Timestamp.replace用法及代碼示例
- Python pandas.Timestamp.round用法及代碼示例
- Python pandas.Timestamp.is_quarter_start用法及代碼示例
注:本文由純淨天空篩選整理自pandas.pydata.org大神的英文原創作品 pandas.Timestamp.today。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。