def METHOD_NAME():
    df = DataFrame(data={'data': [1, 2, 3]})
    c = DateChunker()
    with pytest.raises(Exception) as e:
        next(c.to_chunks(df, 'D'))
    assert('datetime indexed' in str(e.value))
    df.columns = ['date']
    with pytest.raises(Exception) as e:
        next(c.to_chunks(df, 'ZSDFG'))
    assert('Unknown freqstr' in str(e.value) or 'Invalid frequency' in str(e.value))