head¶
- Frame.head(n=5)¶
Return the first n rows of the frame.
This function returns the first n rows of the frame, based on the number of rows specified by the n parameter. If n is not provided, it defaults to 5. It is useful for quickly inspecting the head of a frame for large datasets.
Parameters¶
- nint, optional
Number of rows to return. Defaults to 5.
Returns¶
- Frame
A new Frame instance containing the first n rows.
See Also¶
Frame.tail : Returns the last n rows.
Examples¶
>>> frame = Frame(np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]])) >>> frame.head(2) array([[1, 2, 3], [4, 5, 6]])