code: def _export_table(table, fname):
      
      import os.path as op
      extension = op.splitext(fname.lower())[1]
      if extension == '':
          fname = fname + '.csv'
      table.to_csv(fname, index=None, sep=',', encoding='utf-8',
                   float_format='%.4f', decimal='.')
docs: Export DataFrame to .csv