Hello,
I am in a situation where the Alteryx is on Group By only:
Eg:
Field | Action | Output Field Name |
Col1 | Group By | Col1 |
Col2 | Group By | Col2 |
Col3 | Group By | Col3 |
how do I think about this in terms of how the data will be in the output of this Summarize Tool?
There is only Group By and no aggregation. Could someone please kindly help with this?
How can I re write this process in Pandas?
Thank you!
Solved! Go to Solution.
That configuration in the summarize tool will output the distinct combinations of the fields
Hi @pyalx,
In Alteryx, groupby gives you the unique values of a field.
In Pandas, you could use df.col.unique().tolist(); another common use is df.col.value_counts(normalize = True), and this will give you not only the unique values of a field, but also the % distribution of these values within the field.
*Where df is your DataFrame/Table name; col is your field name.
In SQL, this would be SELECT DISTINCT(col) FROM table.
User | Count |
---|---|
106 | |
82 | |
70 | |
54 | |
40 |