title: How do I select rows within a particular date range in Dask
body: <p>I realize this question must seem trivial. However, I cannot for the life of me figure out what I'm doing wrong.</p>
  <p>Im conducting some cursory analysis on some large data files (between 10-37 GB .CSV's) and have resorted to using Dask (Python 3.9.9). Below is the code:</p>
  <pre><code>
  import dask.dataframe as dd
  import datetime as dt
  import pandas as pd
  import matplotlib.pyplot as plt
  import numpy as np
  import seaborn as sns
  sns.set()
  
  file = &quot;PycharmProjects/502sales/data/InventoryTransfers_0-utf8.csv&quot;
  df = dd.read_csv(file, sep='\t', error_bad_lines=False, dtype={'deleted_at': 'object', 'user_id': 'object'})
  
  
  df['transferred_at'] = dd.to_datetime(df['transferred_at']) # convert date column to datetime objects
  df = df.sort_values(by='transferred_at') # order by dates in this column
  
  # create date mask and filter df
  start_date = dt.date(2020, 8, 1).ctime()
  end_date = dt.date(2020, 9, 1).ctime()
  mask = (df['transferred_at'] &gt; start_date) &amp; (df['transferred_at'] &lt;= end_date)
  transfers_aug_2020 = df.loc[mask]
  
  print(transfers_aug_2020.head(10))
  </code></pre>
  <p>However, when I run this, it returns an empty dataframe. I've tried setting the 'transferred_at' column as the index and using .iloc. I've also tried using .query() but the same thing happens.</p>
  <p>What is peculiar is that if I filter by one condition</p>
  <pre><code>df = df['transferred_at'] &gt; start_date)
  </code></pre>
  <p>instead of two</p>
  <pre><code>(df['transferred_at'] &gt; start_date) &amp; (df['transferred_at'] &lt;= end_date)
  </code></pre>
  <p>it seems to work just fine.</p>