I've been working with Spark having just a basic understanding of Scala and I noticed that I can do both
df.groupBy("c1").count.show
and
df.groupBy("c1").count().show()
Both will produce the same result. When can I use parenthesis for function calls and when can I not? What is the reason for this?