For a batch macro, my input will be a dataframe/table with df_name, keys, values as the column names. (i took a dictionary of dataframes and melted them into 1 dataframe with a column for their original name (for sheet name)).
DF_NAME | key | value |
df1 | col1 | 123 |
df1 | col2 | aaa |
df1 | col2 | bbb |
df2 | colA | 1/1/2025 |
df2 | colA | 1/2/2025 |
df2 | colB | 1000 |
I am missing something that might be simple.
I am trying to supply all rows as a batch grouped by each DF_NAME into a Macro and be able to perform additional steps [--> python tool to pivot the dataframes into individual data frames. Workaround created to get around Python Tool's 5 ouput anchor limitation and inability to use Excel packages within Python tool to output data.]
How to ensure the data batches per df_name and supplies All rows as a group? Do you use a Macro Input with the data columns (named as key and value column) then a Control Parameter for the DF_name?
batch macro should receive only 1 df_name at a time to do some operation:
DF_NAME | key | value |
df1 | col1 | 123 |
df1 | col2 | aaa |
df1 | col2 | bbb |
I am missing something that might be simple.
My solution: I am going to use the Macro Input getting full data then I will add a filter that is updated by Control Parameter passing Df_Name.
Is this the idea solution or is there an built capability that i am missing on how to use such as the Groupyby functionality in control parameter or around Macro input
Solved! Go to Solution.
@ashirsat9
Maybe you can check this article for the Group function of Batch Macro.