Re: python pandas convert strings to datetime problems

2016-04-11 Thread Peter Otten
Daiyue Weng wrote: > Hi, I need to compare the years in a Series. The values in the Series is > like '1996', '2015', '2006-01-02' or '20130101' etc. The code I created > is, > > col_value_series = pd.to_datetime(col_value_series, > infer_datetime_format=True) min_year = col_value_series.min().yea

python pandas convert strings to datetime problems

2016-04-11 Thread Daiyue Weng
Hi, I need to compare the years in a Series. The values in the Series is like '1996', '2015', '2006-01-02' or '20130101' etc. The code I created is, col_value_series = pd.to_datetime(col_value_series, infer_datetime_format=True) min_year = col_value_series.min().year max_year = col_value_series.ma