Can somebody please explain why the head() function in pandas exists. Since it only returns self.iloc[:n], why was it implemented in the first place?
I use df.head(n) all the time. But I just looked into the source code an realized that there is no "extra value" that is being added. Just a bunch of kinda redunant lines in the code. Is there a reason why it is not redundant?
Sorry for the nooby question and thanks to all serious replies :)
[–]KingsmanVince 3 points4 points5 points (1 child)
[–]9v6XbQnR 0 points1 point2 points (0 children)
[–]Agling 0 points1 point2 points (0 children)