--- title: "system.dataset.getColumnHeaders" description: "Takes in a dataset and returns the headers as a python list." --- # system.dataset.getColumnHeaders > Takes in a dataset and returns the headers as a python list. This function is used in **Python Scripting**. ## Description Takes in a [dataset](platform/scripting/python-scripting/variables-datatypes-and-objects/datasets.md) and returns the headers as a Python list. ## Client Permission Restrictions This scripting function has no [Client Permission](../../../ignition-modules/vision/vision-project-properties/vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax `system.dataset.getColumnHeaders(dataset)` ### Parameters Type | Parameter | Description ------- | ------- | ------- Dataset | `dataset` | The input dataset. ### Returns **List** - A list of column header strings. ### Scope Gateway, Vision Client, Perspective Session ## Code Examples ```python title="Code Snippet" # This example fetches the dataset from a Vision table, and prints the table headers as a list. # Fetch data from table component. data = event.source.parent.getComponent('Table').data # Print dataset headers. print system.dataset.getColumnHeaders(data) ``` ```python title="Code Snippet" # Fetch data from Power Table component. data = event.source.parent.getComponent('Power Table').data # Print dataset headers. print system.dataset.getColumnHeaders(data) # Convert list to a string listAsString = ' '.join(system.dataset.getColumnHeaders(data)) # Print list as string print listAsString # Do something useful, such as write the string to a label component event.source.parent.getComponent('Label').text = listAsString ```