how to select all the monday form "20150101" till "20150620"?

length power elearn2014 at gmail.com
Mon Jan 5 00:49:22 EST 2015


import pandas as pd
rng = pd.date_range("20150101","20150620",freq="D")
for day in rng:
   x = pd.to_datetime(day)
   y = x.timetuple().tm_wday
   if(y == 0) :print(x.strftime("%Y%m%d"))


I have selected all  the monday form "20150101" till "20150620",how to make
it more simple?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150105/b07b64c7/attachment.html>


More information about the Python-list mailing list