in kernel/src/main/scala/org/apache/toree/magic/builtin/Dataframe.scala [131:148]
override def execute(code: String): CellMagicOutput = {
val lines = code.trim.split("\n")
Try({
val res: CellMagicOutput = if (lines.length == 1 && lines.head.length == 0){
helpToCellMagicOutput()
} else if (lines.length == 1) {
parseArgs("")
convertToJson(lines.head)
} else {
parseArgs(lines.head)
convertToJson(lines.drop(1).reduce(_ + _))
}
res
}).recover({
case e: Exception =>
helpToCellMagicOutput(Some(e))
}).get
}