finding last business day of a month in python

前端 未结 6 1126
半阙折子戏
半阙折子戏 2020-12-31 08:33

I\'m trying to find last business day of of the month. I wrote the code below for that and it works fine but I was wondering if there is a cleaner way of doing it?

6条回答
  •  时光取名叫无心
    2020-12-31 08:55

    You can use Pandas to get business days. Refer http://pandas.pydata.org/pandas-docs/stable/timeseries.html

    Also you can refer this https://pypi.python.org/pypi/business_calendar/ for simple business days calculation.

提交回复
热议问题