Hi everyone,
I am trying to concatenate address strings across a dataset that has 3.5 million records. I want to concatenate the values of eight fields into a single string, but many of the fields have null values and many have spaces instead of nulls or extra spaces, etc.
What is the most efficient way in Python or Arcade to join strings ignoring nulls or spaces and just having a single space between the joined values? I usually use a function like " ".join((i for i in (str1,str2,str3) if i)) to do this, but across millions of records I'm hoping to avoid the bottleneck of using an if statement. Also, I'm hoping to avoid having to do trim calculations on each field first. Is there a more efficient way to do this?
Thanks!