bigframes.pandas.DataFrame.peek#
- DataFrame.peek(n:int=5,*,force:bool=True,allow_large_results=None)→DataFrame[source]#
Preview n arbitrary rows from the dataframe. No guarantees about row selection or ordering.
DataFrame.peek(force=False)will always be very fast, but will not succeed if data requiresfull data scanning. Usingforce=Truewill always succeed, but may be perform queries.Query results will be cached so that future steps will benefit from these queries.- Parameters:
n (int,default 5) – The number of rows to select from the dataframe. Which N rows are returned is non-deterministic.
force (bool,default True) – If the data cannot be peeked efficiently, the dataframe will instead be fully materialized as partof the operation if
force=True. Ifforce=False, the operation will throw a ValueError.allow_large_results (bool,default None) – If not None, overrides the global setting to allow or disallow large query resultsover the default size limit of 10 GB.
- Returns:
A pandas DataFrame with n rows.
- Return type:
- Raises:
ValueError – If force=False and data cannot be efficiently peeked.