I have an xlsx file having about 100 columns. When I use df.columns
function then it display some of the first and some last columns but not all of them. I want to display(print) all of the column name (headings) though for loop. How can I do it?
Asked
Active
Viewed 616 times
4

Khan
- 95
- 1
- 8
-
Try `print(df.columns.tolist())` to get all the items. It will print out all the cols – Joe Ferndz Feb 14 '21 at 22:47
-
1[python3.5 version: `[*df]`](https://stackoverflow.com/a/55491499/4909087) – cs95 Feb 14 '21 at 22:47