Skip to main content
Question

How to split attribute into two lists

  • December 3, 2024
  • 6 replies
  • 307 views

emerson_styles
Contributor
Forum|alt.badge.img+4

I have a Geometry column that includes an easting and northing that is separated by a space in the middle as follows:

 

I want to split this data up so that eastings go into one column and northings go into another. I have tried using an AttributeSplitter with a space as the delimiter and then a ListExploder to view the results but unfortunately this doubles the number of records in my data instead of creating two unique columns. 

How can I create two separate columns from my data?

6 replies

nielsgerrits
VIP
Forum|alt.badge.img+64

One way to do this is using an AttributeCreator.

 


ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • December 3, 2024

Another option is to use regular expressions to either delete everything before or after the space

 


geomancer
Evangelist
Forum|alt.badge.img+60
  • Evangelist
  • December 3, 2024

Yet another way: get the individual words, as they are separated by a space character.

 


nielsgerrits
VIP
Forum|alt.badge.img+64

Yet another way is to use an AttributeCreator in yet another way😉

Get the individual words, as they are separated by a space character.

 

Learned something new today, thanks!


ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • December 3, 2024

Yet another way: get the individual words, as they are separated by a space character.

 

I wouldn’t have expected @GetWord to include the . character but i see that it does. 


geomancer
Evangelist
Forum|alt.badge.img+60
  • Evangelist
  • December 3, 2024

Somewhat surprisingly, @GetWord only searches for blank spaces (like space, tab, and new line), not interpunction.