Pyspark, Finite Element Analysis, Mathematical Modeling, Databricks.
col("n1") + 1) .withColumn("node_row_index_n1", expr("(case when alpha = 1 then row when alpha = 2 then row when alpha = 3 then row + 1 end)")) .withColumn("node_row_index_n2", expr("(case when alpha = 1 then row + 1 when alpha = 2 then row when alpha = 3 then row + 1 end)"))