Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/5799#discussion_r29404815
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala ---
@@ -1414,4 +1415,37 @@ class DataFrame private[sql](
val jrdd = rdd.map(EvaluatePython.rowToArray(_,
fieldTypes)).toJavaRDD()
SerDeUtil.javaToPython(jrdd)
}
+
+
/////////////////////////////////////////////////////////////////////////////
+ // Statistic functions
+
/////////////////////////////////////////////////////////////////////////////
+
+ // scalastyle:off
+ object stat {
+ // scalastyle:on
+
+ /**
+ * Finding frequent items for columns, possibly with false positives.
Using the algorithm
+ * described in `http://www.cs.umd.edu/~samir/498/karp.pdf`.
+ *
+ * @param cols the names of the columns to search frequent items in
+ * @param support The minimum frequency for an item to be considered
`frequent`
+ * @return A Local DataFrame with the Array of frequent items for each
column.
+ */
+ def freqItems(cols: Array[String], support: Double): DataFrame = {
--- End diff --
in df we usually support List[String] and Seq[String]. This is one reason
why we are using a separate name space.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]