Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/21654#discussion_r217779879
--- Diff: python/pyspark/sql/dataframe.py ---
@@ -375,6 +375,9 @@ def _truncate(self):
return int(self.sql_ctx.getConf(
"spark.sql.repl.eagerEval.truncate", "20"))
+ def __len__(self):
--- End diff --
How about `iter(df)` .. how about `df[0]` ..
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]