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=True will 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 ifforce=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:

pandas.DataFrame

Raises:

ValueError – If force=False and data cannot be efficiently peeked.

On this page

This Page