Q:

Get Column Headers in KDB/q Query

How can i get the just the column headers of a table in KDB? Is there a special query for this? I am asking because when I pull the data from the table into python the column headers are lost. Thanks!

A:

If you're using one of the two regular python APIs for getting data from KDB, I think both implement a Flip class from which you can get the column names (usually there is an x which is an array of strings).
Otherwise cols tableName gives you list of symbols (which would be deserialized as an array of strings in python) 

