Skip to content

Instantly share code, notes, and snippets.

@sakurai-youhei
Created December 3, 2020 06:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sakurai-youhei/3c7dd150caa465fa6fcd7b563a62ed9b to your computer and use it in GitHub Desktop.
Save sakurai-youhei/3c7dd150caa465fa6fcd7b563a62ed9b to your computer and use it in GitHub Desktop.
All days & weekdays in Pandas
import pandas as pd
period = ("2020-01-01", "2020-12-31")
alldays = pd.date_range(*period, freq="D") # 期間中の毎日
weekdays = pd.date_range(*period, freq="B") # 期間中の月~金
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment