Skip to content

Instantly share code, notes, and snippets.

@martincooper
Last active August 29, 2015 14:13
Show Gist options
  • Save martincooper/f5a5e5e0eb171d3cc954 to your computer and use it in GitHub Desktop.
Save martincooper/f5a5e5e0eb171d3cc954 to your computer and use it in GitHub Desktop.
Replace Row In Scala DataTable
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