I have a little problem with the .loc
function.
Here is the code:
date = df.loc [df ['date'] == d] .index [0]
d
is a specific date (e.g. 21.11.2019)
The problem is that the weekend can take days. In the dataframe in the column date
there are no values for weekend days. (contains calendar days for working days only)
Is there any way that if d
is on the weekend he'll take the next day?
I would have something like index.get_loc
, method = bfill
Does anyone know how to implement that for .loc
?