code: def export(self, fileName=None):
      if not isinstance(self.item, PlotItem):
          raise TypeError(
              "Must have a PlotItem selected for CSV export."
          )
  
      if fileName is None:
          self.fileSaveDialog(filter=["*.csv", "*.tsv"])
          return
  
      for item in self.item.items:
          if isinstance(item, ErrorBarItem):
              self._exportErrorBarItem(item)
          elif hasattr(item, "implements") and item.implements(
              "plotData"
          ):
              self._exportPlotDataItem(item)
  
      sep = "," if self.params["separator"] == "comma" else "\t"
      # we want to flatten the nested arrays of data into columns
      columns = [column for dataset in self.data for column in dataset]
      with open(fileName, "w", newline="") as csvfile:
          writer = csv.writer(
              csvfile, delimiter=sep, quoting=csv.QUOTE_MINIMAL
          )
          writer.writerow(self.header)
          for row in itertools.zip_longest(*columns, fillvalue=""):
              row_to_write = [
                  item
                  if isinstance(item, str)
                  else np.format_float_positional(
                      item, precision=self.params["precision"]
                  )
                  for item in row
              ]
              writer.writerow(row_to_write)
  
      self.header.clear()
      self.data.clear()
  
file_path: pyqtgraph/pyqtgraph/exporters/CSVExporter.py
imports: import csv
  import itertools
  import numpy
  from ..None import ErrorBarItem, PlotItem
  from ..parametertree import Parameter
  from ..Qt import QtCore
  from .Exporter import Exporter
label_desc: Use image node_id 5 for calling the CSVExporter obj's underlying member method code with example usage: obj.export(fileName) without return types