code: def line_plot(df, xypairs, mode, layout={}, config=_BASE_CONFIG):
          
          if df.empty:
              return {
                  "x": [],
                  "y": [],
                  "mode": mode
              }
  
          _data = []
          for x, y in xypairs:
              if (x in df.columns) and (y in df.columns):
                  _data.append(
                      {
                          "x": df[x].values.tolist(),
                          "y": df[y].values.tolist(),
                          "mode": mode
                      }
                  )
  
          return {
              "data": _data,
              "layout": layout,
              "config": config
              }
docs: basic line plot
  
              dataframe to json for a line plot
  
              Args:
                  df (pandas.DataFrame): input dataframe
                  xypairs (list): list of tuples containing column names
                  mode (str): plotly.js mode (e.g. lines)
                  layout (dict): layout parameters
                  config (dict): config parameters