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
相关文章
相关标签/搜索