I am looking for a way to select columns of my dataframe in pyspark. For the first row, I know I can use df.first() but not sure about columns given that they do
df.first()
First two columns and 5 rows
df.select(df.columns[:2]).take(5)