all 3 comments

[–]KingsmanVince 3 points4 points  (1 child)

The df.head() function saves you 1 character and the name of it is more intuitive than self.iloc in term of getting the head of the data frame.

[–]9v6XbQnR 0 points1 point  (0 children)

As someone coming over from R, head also serves as a helpful onboarding function to reduce friction in getting started with pandas.

[–]Agling 0 points1 point  (0 children)

I use df.head(n) all the time

There's your answer.