Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
small variant always with pandas solution in 3rd party category for Weekend Counter by rybld2
def checkio(from_date, to_date):
import pandas as pd
idx = pd.date_range(from_date, to_date)
idx=[x.weekday() for x in idx]
res = (pd.DataFrame(idx, columns=['we'])
.query("we in [5, 6]")
.pipe(len)
)
return res
June 9, 2021
Comments: