TableWidget

class pyqtgraph.TableWidget(*args)

Extends QTableWidget with some useful functions for automatic data handling and copy / export context menu. Can automatically format and display:

  • numpy arrays
  • numpy record arrays
  • metaarrays
  • list-of-lists [[1,2,3], [4,5,6]]
  • dict-of-lists {‘x’: [1,2,3], ‘y’: [4,5,6]}
  • list-of-dicts [{‘x’: 1, ‘y’: 4}, {‘x’: 2, ‘y’: 5}, ...]
__init__(*args)
appendData(data)

Types allowed: 1 or 2D numpy array or metaArray 1D numpy record array list-of-lists, list-of-dicts or dict-of-lists

copyAll()

Copy all data to clipboard.

copySel()

Copy selected data to clipboard.

iteratorFn(data)

Return 1) a function that will provide an iterator for data and 2) a list of header strings

saveAll()

Save all data to file.

saveSel()

Save selected data to file.

serialize(useSelection=False)

Convert entire table (or just selected area) into tab-separated text values

Previous topic

DataTreeWidget

Next topic

TreeWidget

This Page