def survival_status(data, duration_col, event_col, end_time, inplace=False):
    """Get status of event at a specified time. 

    0: status = 0, Time = end_time (T >= end_time) 
       status = 0, Time = T  (T < end_time)
    1: status = 1, Time = T  (T <= end_time)
       status = 0, Time = end_time (T > end_time)

    Parameters
    ----------
    data : pandas.DataFrame
        Full survival data.
    duration_col : str
        Name of column indicating time.
    event_col : str
        Name of column indicating event.
    end_time : int
        End time of study.
    inplace : bool, default False
        Do replace original data.

    Returns
    -------
    None or tuple
        data indicates status of survival.
        
        None or tuple(time(pandas.Series), status(pandas.Series))

    Examples
    --------
    >>> survival_status(data, 'T', 'E', 10, inplace=False)
    """
    if inplace:
        data.loc[(data[event_col] == 1) & (data[duration_col] > end_time), event_col] = 0
        data.loc[data[duration_col] > end_time, duration_col] = end_time
    else:
        T = data[duration_col].copy()
        E = data[event_col].copy()
        T[data[duration_col] > end_time] = end_time
        E[(data[event_col] == 1) & (data[duration_col] > end_time)] = 0
        return T, E