I need to partition pandas.tslib.Timestamp into weeks.
So, given that a
is a pd.DataFrame I used
tmp = pd.to_datetime(a)
tmp = tmp.apply(lambda x: str(str(x.isocalendar()[1]))
The problem is that my week starts not on Monday or Sunday but Tuesday (it can even start on Wed - it is user defined). Is it possible to change the starting week definition and still to use generic python functions?
Or is there another work-around?