TableWidget

class pyqtgraph.TableWidget(*args, **kwds)

Extends QTableWidget with some useful functions for automatic data handling and copy / export context menu. Can automatically format and display a variety of data types (see setData() for more information.

__init__(*args, **kwds)
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

clear()

Clear all contents from the table.

copyAll()

Copy all data to clipboard.

copySel()

Copy selected data to clipboard.

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

setData(data)

Set the data displayed in the table. Allowed formats are:

  • 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}, ...]

Previous topic

DataTreeWidget

Next topic

TreeWidget

This Page