I want to calculate the number of days between the Current date and the 1st day of the current month. If the date is the 1st of the month itself then my variable (let's call it X) should be assigned 1 else it calculates the difference.
I've tried using the busday_count
function available in Python as shown below but it gives me the following error
np.busday_count((datetime.date(now.year,now.month,1)), datetime.datetime.now())
error
TypeError Traceback (most recent call last) in ----> 1 np.busday_count((datetime.date(now.year,now.month,1)), now)
TypeError: Iterator operand 1 dtype could not be cast from dtype('