loop

Conditional in Python: map vs loop

Usually I need to classify some kind of data. Some weeks ago, I had a huge file with dates and precipitation, and one of the tasks was classify each day as ten-day. Thus, each month was divided in three sections as follow: from day 01 up to 10 is *ten-day 01* from day 11 up to 20 is *ten-day 02* from day 21 up to 31 is *ten-day 03* Most of time I had used loops (Python language), however this time the process took a little bit slow.