Calendar Functions – Set 2:

Here, in this article, we will look at some of the functions in python for data science:

  1. monthrange(year, month) – When we call this function, it will return two integers. The first one is the starting day number of week (0 is taken as Monday). The second one is the number of days in the month.
  2. prcal(year, w, I, c) – This function is there to print the calendar of any specific year but without using the print operation.

python data science

  1. prmonth(year, month, w, I) – This function is there for printing the month of a specific year without the use of print operation.
  2. Setfirstweekday(num) – This function is there to set the day start number of week.python data science
  3. weekday(year, month, date) – This function will return the weekday number of the date which is specified in the argument.

To learn more about calander in python for data science and programming, you can check this and this as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.