Pyspark, Finite Element Analysis, Mathematical Modeling, Databricks.
.withColumn("node_column_index_n1", expr("(case when alpha = 1 then column when alpha = 2 then column + 1 when alpha = 3 then column end)")) .withColumn("node_column_index_n2", expr("(case when alpha = 1 then column when alpha = 2 then column + 1 when alpha = 3 then column + 1 end)")) ) T_spark =