I have code here where I'm searching through a series on a pandas dataframe.
df[(df['SlyWeekofFiscalYear']==wk) &
(df['IB']==bnd) &
(df['slyfiscalyear']==yr)]
['Wholesale'].sum()
It's in a function that passes a kwarg bnd=None. Is there a way to disregard the 2nd line of code if bnd=None?
Currently I have a long if statement but I'd like to tidy up the code if possible.