Last active
August 29, 2015 14:13
-
-
Save martincooper/f5a5e5e0eb171d3cc954 to your computer and use it in GitHub Desktop.
Replace Row In Scala DataTable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.github.martincooper.datatable.TypedDataValueImplicits._ | |
val matchingRow = table.find(row => row.as[Int]("FieldId") == 1000) | |
val newTable = matchingRow match { | |
case Some(row) => table.rows.replace(row.rowIndex, "NewValue", 100, 5.5d, true) | |
case _ => Success(table) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment