snowflake.snowpark.DataFrame.limit¶
- DataFrame.limit(n: int, offset: int = 0) DataFrame[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/dataframe.py#L1741-L1772)¶
Returns a new DataFrame that contains at most
nrows from the current DataFrame, skippingoffsetrows from the beginning (similar to LIMIT and OFFSET in SQL).Note that this is a transformation method and not an action method.
- Parameters:
n – Number of rows to return.
offset – Number of rows to skip before the start of the result set. The default value is 0.
Example: