How do we combine multiple individual tag columns into an ArrayType collection column?
array(*cols) combines multiple columns of the same type into a single ArrayType collection column.
Combining categorization tags, multi-category labels, and sequence collections.
from pyspark.sql.functions import col, array
df = df.withColumn("tags", array(col("tag1"), col("tag2")))Practice typing production-grade PySpark code for Creating Array Collections with array().