Skip to main content

Limit

Limits the number of rows in the output

Parameters

ParameterDescriptionRequired
DataFrameInput DataFrameTrue
LimitNumber of rows required in output (Allowed range: [0, 231 -1])True

Example

Example usage of Limit

Spark Code

def limit(spark: SparkSession, in0: DataFrame) -> DataFrame:
return in0.limit(10)