def datetime_to_clocktime(index):
    """
    Convert DataFrame index from datetime to clocktime (seconds past midnight)
    
    Parameters
    --------------
    index : pandas Index
        DataFrame index in datetime
    
    Returns
    ----------
    pandas Index
        DataFrame index in clocktime
    """
    clocktime = (index.hour * 3600 + index.minute * 60 + index.second + 
        index.microsecond / 1000000.0)
    return clocktime
