Skip to main content
Question

Trim white space from column names?


aron
Supporter
Forum|alt.badge.img+16
  • Supporter

I have some datasets with unpredictable white spaces in the attribute (column) names. Is there a way to automatically trim these? The trimming tools I found all seem to be dealing with strings.

3 replies

david_r
Celebrity
  • October 26, 2023

Did you look at the BulkAttributeRenamer? You can e.g. replace all spaces with nothing, or use a regex to constrain it further.


aron
Supporter
Forum|alt.badge.img+16
  • Author
  • Supporter
  • November 2, 2023

I tried that but it went for the rows, I want to correct the attribute headings, the column names. Sorry that my explanation is a bit confusing.


aron
Supporter
Forum|alt.badge.img+16
  • Author
  • Supporter
  • November 2, 2023

I just found somewhat of a workaround.

 

In the AttributeManager it is enough just to click each row in the Output Attribute column, if there is any white space the row is automatically set to rename, and the white space removed.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings