I am importing an excel sheet into Mathematica. The result is a rectangular array. The array contains sequences of commas. Whenever a cell is empty in the Excel sheet consecutive commas appear in the imported array. How to get rid of them? So I am looking for a function $f$ such that for example
f({1,2,3,2,1,,,,6,5,4,3,,,,8})={1,2,3,2,1,6,5,4,3,8}
It doesn't look easy to me because it looks like reinventing the wheel.
Any help will be much appreciated.
""
), so you can replace them with e.g.Nothing
and they will be spliced away. For instance,{{1, "", 2}, {"", 2, 3}} /. "" -> Nothing
gives{{1, 2}, {2, 3}}
. $\endgroup${1, 2, , , 3} /. Null -> Nothing
$\endgroup$