I am trying to implement pagination using the pyspark dataframe. Earlier I was thinking of having page numbers calculated and then slice the chunk of rows based on page number and return.
but after understanding a little bit about pyspark I am not able to get this working as pyspark does not allow accessing rows from middles/ randomly.
I am new to pyspark, what I am trying to implement here looks like.
I have 5000 rows in the pyspark dataframe. I want to have 100 rows per page and fetch only 10 pages at a time so that it does not impact local memory.