PySpark referenceClassesDataFramefirstOn this pagefirst (DataFrame) Returns the first row as a Row. Syntax first() Returns Row: First row if DataFrame is not empty, otherwise None. Examples Pythondf = spark.createDataFrame([ (2, "Alice"), (5, "Bob")], schema=["age", "name"])df.first()# Row(age=2, name='Alice')