Breaks the given dataframe into  an X frame and a y series by the given
    column name.

    The original frame is returned, without the y series column, as the X
    frame, so no new dataframes are created.

    Parameters
    ----------
    df : pandas.DataFrame
        The dataframe to split.
    y_col_lbl : object
        The label of the y column.

    Returns
    -------
    X, y : pandas.DataFrame, pandas.Series
        A dataframe made up of all columns but the column with the given name
        and a series made up of the same column, respectively.

    Example
    -------
    >>> import pandas as pd
    >>> data = [[23, 'Jo', 4], [19, 'Mi', 3]]
    >>> df = pd.DataFrame(data, [1, 2] , ['Age', 'Name', 'D'])
    >>> X, y = x_y_by_col_lbl(df, 'D')
    >>> X
       Age Name
    1   23   Jo
    2   19   Mi
    >>> y
    1    4
    2    3
    Name: D, dtype: int64

def x_y_by_col_lbl_inplace(df, y_col_lbl):
    """Breaks the given dataframe into  an X frame and a y series by the given
    column name.

    The original frame is returned, without the y series column, as the X
    frame, so no new dataframes are created.

    Parameters
    ----------
    df : pandas.DataFrame
        The dataframe to split.
    y_col_lbl : object
        The label of the y column.

    Returns
    -------
    X, y : pandas.DataFrame, pandas.Series
        A dataframe made up of all columns but the column with the given name
        and a series made up of the same column, respectively.

    Example
    -------
    >>> import pandas as pd
    >>> data = [[23, 'Jo', 4], [19, 'Mi', 3]]
    >>> df = pd.DataFrame(data, [1, 2] , ['Age', 'Name', 'D'])
    >>> X, y = x_y_by_col_lbl(df, 'D')
    >>> X
       Age Name
    1   23   Jo
    2   19   Mi
    >>> y
    1    4
    2    3
    Name: D, dtype: int64
    """
    y = df[y_col_lbl]
    df.drop(
        labels=y_col_lbl,
        axis=1,
        inplace=True,
    )
    return df, y