When I create a table in ipython notebook, how can I escape pipes inside of text.
This is what I have
identifier | class name | args | distance function
------------|------------------|-------------------
“euclidean” | EuclideanDistance | | sqrt(sum((x - y)^2))
“minkowski” | MinkowskiDistance |p| `sum(|x - y|^p)^(1/p)`
It comes out as like below but obviously sum(|x - y|^p)^(1/p) is a formula and all the texts need to stay together...
Use the escaped pipe version |
to display the pipe characters properly when table is rendered for ipython notebook markdown cells.
identifier | class name | args | distance function
------------|------------------|-------------------
“euclidean†| EuclideanDistance | | sqrt(sum((x - y)^2))
“minkowski†| MinkowskiDistance |p| sum(|x - y|^p)^(1/p)
*make sure you get rid of the tick marks.
Outcome in notebook should display as such:
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments