While a data table is accessible from Python and JSL, df in the script above is the variable in the Python environment holding a pointer to the data table. JSL knows nothing about the variable df unless you get do a Python Get(df); from JSL, that makes a JSL variable that references the same data table that df references. While there is no Get Column Names() from the Python side, you need to think in Python instead of JSL. each column in the table has a name property see the Scripting Index.
import jmp
dt = jmp.open(jmp.SAMPLE_DATA + "Big Class.jmp")
# print then set the first column's name from python
# note the column index is zero-based just like Python.
# You can also access the column by name: print(dt['age'])
print(dt[0].name)
dt[0].name = 'First Name'
# simple list comprehension to walk data table columns
# and build a list of names from the column's name property
names = [x.name for x in dt]
print(names)
A JMP data table behaves as a list of columns and the columns behave as a list of rows. There is a wealth of information in the Python category of the scripting index. The above support has been in place since 18.0.0.
The design principle of the Python support is to behave the way a Python programmer would expect and there is rich support, especially in the jmp.DataTable object for doing things in a 'Pythonic' way.