df = pd.DataFrame({'a': [1, 2, 3], 'b': [4, 5, 6], 'c': [7, 8, 9]})
To list the column names in a DataFrame:
>>> list(df)
['a', 'b', 'c']
This list comprehension method is especially useful when using the debugger:
>>> [c for c in df]
['a', 'b', 'c']
This is the long w...