from datetime import datetime


def twitter_date2dt(df, header):
    """
    converts "twitter time" into datetime

    Parameters
    ----------
    df : DateFrame
        The df
    header : str
        The header of the column that you wish to convert

    Returns
    -------
    column : Series
        Where the elements are datetime in the form "YYYY-mm-dd HH:MM:SS"
    """
    date_format = "%Y-%m-%dT%H:%M:%S.%fZ"
    column = df[header].apply(lambda x: datetime.strptime(x, date_format))
    column = column.dt.date
    return column