code: def to_csv(df, filepath, sep=',', header=True, index=True):
      
      df.to_pandas().to_csv(filepath,
                            sep=sep,
                            header=header,
                            index=index)
docs: Save DataFrame as csv.
  
      Note data is expected to be evaluated.
  
      Currently delegates to Pandas.
  
      Parameters
      ----------
      df : DataFrame
      filepath : str
      sep : str, optional
          Separator used between values.
      header : bool, optional
          Whether to save the header.
      index : bool, optional
          Whether to save the index columns.
  
      Returns
      -------
      None
  
      See Also
      --------
      pandas.DataFrame.to_csv : https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_csv.html