title: Pandas: Using workalendar to check if a date is a holiday and assigning boolean value for UK and other countries' calendars
body: <p>I have financial time series for several countries and for each of those time series I want to drop observations that fall on public holidays of that particular country. To do that I'm creating a new column in my time series with boolean values to indicate if the date is a holiday or not. </p>
  
  <p>So I found this code to assign boolean values and it works great for my US time series:
  <a href="https://stackoverflow.com/questions/29688899/pandas-checking-if-a-date-is-a-holiday-and-assigning-boolean-value">Pandas: Checking if a date is a holiday and assigning boolean value</a></p>
  
  <p>But I'm not able to get it to work for other countries. I tried using workalendar such as the code below but get error messages. I would appreciate any advice on using workalendar or other methods.</p>
  
  <pre><code>from datetime import date
  from workalendar.europe import UnitedKingdom
  cal = UnitedKingdom()
  
  holidays = cal.holidays(start=uk_daily['Date for PH'].min(), 
                      end=uk_daily['Date for PH'].max()).to_pydatetime()
  uk_daily['Holiday'] = uk_daily['Date for PH'].isin(holidays)
  </code></pre>
  
  <pre><code>---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-26-2d820caa4432&gt; in &lt;module&gt;
        4 
        5 holidays = cal.holidays(start=uk_daily['Date for PH'].min(),
  ----&gt; 6                         end=uk_daily['Date for PH'].max()).to_pydatetime()
  
  TypeError: holidays() got an unexpected keyword argument 'start'
  </code></pre>
  
  <p>The data is just a Pandas dataframe with a time index and a few columns. I get the same error message using this reproducible example:</p>
  
  <pre><code>import pandas as pd
  from datetime import date
  from workalendar.europe import UnitedKingdom
  cal = UnitedKingdom()
  
  dr = pd.date_range(start='1996-01-01', end='2019-06-28')
  df = pd.DataFrame()
  df['Date'] = dr
  
  holidays = cal.holidays(start=dr.min(), end=dr.max()).to_pydatetime()
  df['Holiday'] = df['Date'].isin(holidays)
  df.head(10)
  </code></pre>