Answers for "convert timestamp datetime to int no astype"

0

convert timestamp datetime to int no astype

# example for year only. just lead with int. no astype needed.
int(pd.Timestamp.today().strftime('%Y'))
# 2022
Posted by: Guest on January-18-2022

Code answers related to "convert timestamp datetime to int no astype"

Python Answers by Framework

Browse Popular Code Answers by Language