Limit
Spark Gem
Limits the number of rows in the output.
Parameters
Parameter | Description | Required |
---|---|---|
DataFrame | Input DataFrame | True |
Limit | Number of rows required in output (Allowed range: [0, 231 -1]) | True |
Example
Spark Code
- Python
- Scala
def limit(spark: SparkSession, in0: DataFrame) -> DataFrame:
return in0.limit(10)
object limit {
def apply(spark: SparkSession, in: DataFrame): DataFrame =
in.limit(10)
}