def parallel_coordinates(
    data,
    class_column,
    cols=None,
    alpha=None,
    width=450,
    height=300,
    interactive=True,
    var_name="variable",
    value_name="value",
    **kwds
):
    """
    Parallel coordinates plotting.

    Parameters
    ----------
    frame: DataFrame
    class_column: str
        Column name containing class names
    cols: list, optional
        A list of column names to use
    alpha: float, optional
        The transparency of the lines
    interactive : bool, optional
        if True (default) then produce an interactive plot
    width : int, optional
        the width of the plot in pixels
    height : int, optional
        the height of the plot in pixels
    var_name : string, optional
        the legend title
    value_name : string, optional
        the y-axis label

    Returns
    -------
    chart: alt.Chart object
        The altair representation of the plot.

    See Also
    --------
    pandas.plotting.parallel_coordinates : matplotlib version of this routine
    """
    if kwds:
        warnings.warn(
            "Unrecognized keywords in pdvega.scatter_matrix: {0}"
            "".format(list(kwds.keys()))
        )

    # Transform the dataframe to be used in Vega-Lite
    if cols is not None:
        data = data[list(cols) + [class_column]]
    cols = data.columns
    df = data.reset_index()
    index = (set(df.columns) - set(cols)).pop()
    assert index in df.columns
    df = df.melt([index, class_column], var_name=var_name, value_name=value_name)

    chart = alt.Chart(df).properties(width=width, height=height)
    chart = chart.mark_line().encode(
         x=alt.X(field=var_name, type=infer_vegalite_type(df[var_name])),
         y=alt.Y(field=value_name, type=infer_vegalite_type(df[value_name])),
         color=alt.Color(field=class_column, type=infer_vegalite_type(df[class_column])),
         detail=alt.Detail(field=index, type=infer_vegalite_type(df[index]))
    )

    if alpha is None and df[class_column].nunique() > 20:
        alpha = 0.3

    if alpha is not None:
        assert 0 <= alpha <= 1
        return chart.encode(opacity=alt.value(alpha))
    return chart
Parallel coordinates plotting.

    Parameters
    ----------
    frame: DataFrame
    class_column: str
        Column name containing class names
    cols: list, optional
        A list of column names to use
    alpha: float, optional
        The transparency of the lines
    interactive : bool, optional
        if True (default) then produce an interactive plot
    width : int, optional
        the width of the plot in pixels
    height : int, optional
        the height of the plot in pixels
    var_name : string, optional
        the legend title
    value_name : string, optional
        the y-axis label

    Returns
    -------
    chart: alt.Chart object
        The altair representation of the plot.

    See Also
    --------
    pandas.plotting.parallel_coordinates : matplotlib version of this routine