pandas date to string
问题 i have a datetime pandas.Series . One column called "dates". I want to get 'i' element in loop like string. s.apply(lambda x: x.strftime('%Y.%m.%d')) or astype(str).tail(1).reset_index()['date'] or many other solutions don't work. I just want a string like '2016-09-16' (first datetime element in series) and not what is currently returned, which is: ss = series_of_dates.astype(str).tail(1).reset_index()['date'] "lol = %s" % ss lol = 0 2016-09-16\nName: date, dtype: object I need just: lol =