to_datetime 以及 dt.days、dt.months

Series類型的數據,通過 to_datetime 以後就能夠用 pandas.Series.dt.day 和 pandas.Series.pd.month。html   import pandas as pd a = pd.Series(['2017-1-2','2017-9-1']) print(a) 0 2017-1-2 1 2017-9-1 dtype: object a
相關文章
相關標籤/搜索