cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to limit number rows to display using display method in Spark databricks notebook ?

ramravi
Contributor II
 
2 REPLIES 2

Ajay-Pandey
Esteemed Contributor III

@Ravi Tejaโ€‹ you can use limit() function to limit the number of row

You can refer below code -

data_frame.limit(10).display()

Rishabh264
Honored Contributor II

hey @Ravi Tejaโ€‹ there is two methods by which we can limit our datafame , by using take and limit .

refer this concept

myDataFrame.take(10)

-> results in an Array of Rows. This is an action and performs collecting the data (like collect does).

myDataFrame.limit(10)

-> results in a new Dataframe. This is a transformation and does not perform collecting the data.