def concat_dataset(data, bdate, edate):
    """Concatenate pandas DataFrame with DateTimeIndex to the specified time
    period (bdate, edate).

    Args:
        data (pandas DataFrame): Air sensor dataset to concatenate.
        bdate (str): The beginning timestamp for the concatenated dataset.
        edate (str): The ending timestamp for the concatenated dataset.

    Returns:
        data (pandas DataFrame): The concatenated sensor dataset.

    """
    if bdate is not None:
        data = data.loc[bdate:, :]
    if edate is not None:
        data = data.loc[:edate, :]
    return data