title: Check if Pandas column values are not in list
body: <p>I have a dataframe consisting of counts within 10 minute time intervals, how would I set count = 0 if the time interval doesn't exist?</p>
  
  <p><strong>DF1</strong></p>
  
  <pre><code>import pandas as pd
  import numpy as np
  
  df = pd.DataFrame({ 'City' : np.random.choice(['PHOENIX','ATLANTA','CHICAGO', 'MIAMI', 'DENVER'], 10000),
                      'Day': np.random.choice(['Monday','Tuesday','Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'], 10000),
                      'Time': np.random.randint(1, 86400, size=10000),
                      'COUNT': np.random.randint(1, 700, size=10000)})
  
  df['Time'] = pd.to_datetime(df['Time'], unit='s').dt.round('10min').dt.strftime('%H:%M:%S')
  print(df)
  
        COUNT     City        Day      Time
  0       441  PHOENIX   Thursday  10:20:00
  1       641  ATLANTA     Monday  14:30:00
  2       661  PHOENIX   Saturday  03:50:00
  3       570    MIAMI    Tuesday  21:00:00
  4       222  CHICAGO     Friday  15:00:00
  </code></pre>
  
  <p><strong>DF2</strong> - My approach is to create all the 10 minute time slots in a day (6*24 = 144 entries) and then use "not in"</p>
  
  <pre><code>df2 = pd.DataFrame({'TIME_BIN': np.arange(0, 86401, 600), })
  df2['TIME_BIN'] = pd.to_datetime(df2['TIME_BIN'], unit='s').dt.round('10min').dt.strftime('%H:%M:%S')
  
       TIME_BIN
  0    00:00:00
  1    00:10:00
  2    00:20:00
  3    00:30:00
  4    00:40:00
  5    00:50:00
  6    01:00:00
  7    01:10:00
  8    01:20:00
  </code></pre>
  
  <p>How do I check if the timeslots in DF2 do not exist in DF1 for each city and day and if so, set count = 0? I basically just need to fill in all the missing time slots in DF1.</p>
  
  <p><strong>Attempt:</strong></p>
  
  <pre><code>for each_city in df.City.unique():
      for each_day in df.Day.unique():
          df['Time'] = df.apply(lambda row: df2['TIME_BIN'] if row['Time'] not in (df2['TIME_BIN'].tolist()) else None)
  </code></pre>