Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

What is the Alteryx equivalent to Pandas when Alteryx is GroupBy only?

pyalx
6 - Meteoroid

Hello,

 

I am in a situation where the Alteryx is on Group By only:

 

Eg: 

 

FieldActionOutput Field Name
Col1Group ByCol1
Col2Group ByCol2
Col3Group ByCol3

 

 

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!

2 REPLIES 2
Luke_C
17 - Castor
17 - Castor

That configuration in the summarize tool will output the distinct combinations of the fields

martinding
13 - Pulsar

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.

 

Labels
Top Solution Authors