You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2015/05/01 21:07:08 UTC

[jira] [Commented] (SPARK-7243) Contingency table for DataFrames

    [ https://issues.apache.org/jira/browse/SPARK-7243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14523723#comment-14523723 ] 

Apache Spark commented on SPARK-7243:
-------------------------------------

User 'brkyvz' has created a pull request for this issue:
https://github.com/apache/spark/pull/5842

> Contingency table for DataFrames
> --------------------------------
>
>                 Key: SPARK-7243
>                 URL: https://issues.apache.org/jira/browse/SPARK-7243
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>            Reporter: Xiangrui Meng
>            Assignee: Burak Yavuz
>
> Create contingency table for two columns in a DataFrame. This is `table` in R and `crosstab` in pandas.
> ~~~
> df.stat.crosstab(col1, col2): DataFrame
> ~~~
> It returns a local DataFrame with "$col1_$col2" and values from col2 as the column names. Values from col1 become the values in the first column.
> If users want to ignore NA, they should filter NAs first.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org