Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #83232
| Date | 2015-01-05 13:49 +0800 |
|---|---|
| Subject | how to select all the monday form "20150101" till "20150620"? |
| From | length power <elearn2014@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.17389.1420459595.18130.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
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?
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
how to select all the monday form "20150101" till "20150620"? length power <elearn2014@gmail.com> - 2015-01-05 13:49 +0800
csiph-web