def convert_pandas_to_plotly(df, **kwargs):
    """
    Converts pandas DataFrame to plotly figure

    :param df: pandas DataFrame
    """
    try:
        import plotly.graph_objs as go
    except ImportError:
        raise ImportError(
            textwrap.dedent(
                """
                    No module named 'plotly'. You can install it with follow command:

                    > pip install twelvedata[pandas, plotly] 

                    or 

                    > pip install plotly
                """
            ).strip()
        )

    traces = [
        go.Scatter(x=df.index, y=df[col], mode="lines", name=col) for col in df.columns
    ]

    return go.Figure(traces)

    Converts pandas DataFrame to plotly figure

    :param df: pandas DataFrame
    
src/twelvedata/utils.py