We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
When using GroupBy() and then Aggregation() the column order that outputs is not as I'd expect coming from Pandas.
Is there a reason the order is not preserved or the new aggregated columns are not simply appended in the order they are entered?
Gota seems to append columns in alphabetical order, is there a reason for that extra sorting step the user doesn't explicitly call?
The code below will not output the columns in the order they are entered into the []string
func cleanDataframe(df *dataframe.DataFrame) (*dataframe.DataFrame, error) { group := *df.GroupBy("CustomerId", "ShortSku") if group.Err != nil { return nil, group.Err } agg_df := group.Aggregation([]dataframe.AggregationType{ dataframe.Aggregation_SUM, dataframe.Aggregation_FIRST, dataframe.Aggregation_FIRST, dataframe.Aggregation_FIRST, dataframe.Aggregation_FIRST, dataframe.Aggregation_FIRST, dataframe.Aggregation_FIRST, dataframe.Aggregation_FIRST, dataframe.Aggregation_FIRST, dataframe.Aggregation_FIRST, dataframe.Aggregation_FIRST, dataframe.Aggregation_FIRST, dataframe.Aggregation_SUM, dataframe.Aggregation_COUNT}, []string{ "Quantity", "CustomerName", "Address1", "Address2", "City", "State", "Zip", "Country", "Phone", "Email", "ClubEnrollment", "AccountType", "Spend", "OrderCount"}) if agg_df.Err != nil { return nil, agg_df.Err } return &agg_df, nil }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
When using GroupBy() and then Aggregation() the column order that outputs is not as I'd expect coming from Pandas.
Is there a reason the order is not preserved or the new aggregated columns are not simply appended in the order they are entered?
Gota seems to append columns in alphabetical order, is there a reason for that extra sorting step the user doesn't explicitly call?
The code below will not output the columns in the order they are entered into the []string
The text was updated successfully, but these errors were encountered: