Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Python to Match Amount based on Group

Divyajyothi7
8 - Asteroid

Hi 

I have following input

 

CurrencyAmount
USD-100.5
USD40.5
USD60
USD22.34
INR-50
INR-50
INR-200.67
INR-100.67
INR33.45

 

Expected Output : 

CurrencyAmountType
USD-100.5Balanced
USD40.5Balanced
USD60Balnced
USD22.34 
INR-50Balanced
INR-50Balanced
INR-200.67Balanced
INR-100.67Balanced
INR33.45 

 

I have tried Python logic, Unable to get expected output
note : my original data will have 700 rows, it will be scrambled, I'm looking for optimized code which can run the flow smoothly

 

@binuacs please look into this

 

1 REPLY 1
binuacs
21 - Polaris

@Divyajyothi7 one way of doing this

image.png

Labels
Top Solution Authors