Generation

generate functionTue, 14 Feb 2023

Rewrite the function below so it is called 'is_month_end' instead of 'is_quarter_end' and output 1 if the 'Date' column shows the last day of the month df['is_quarter_end'] = np.where(df['month']%3==0,1,0) df.head()

def is_month_end(date): # Your code goes here. is_month_end(date)

Questions about programming?Chat with your personal AI assistant