I have a dataframe with about 500 columns and that's why I am wondering if there is anyway that I could use head() function but want to see the first 50 columns for example.
Thanks
I wasn't sure if you meant rows or columns.
If it's rows, then
df.head(50)
will do the trick.
If it's columns, then
df.iloc[:, : 50]
will work.
Of course, you can combine them.
You can see this stuff at Indexing and Selecting Data.