I've got to a point where I have some data stored in a pgfplotstable macro. I want to remove a row from that macro (a line where some data is missing) and then further process the remaining data (doing some calculations) before plotting it with pgfplots. What I think would work would be if I could create a new macro containing all of the original data, omitting the row where data is missing. Is this possible? Or is there a better way? This is a simplified version of the situation I'm in. In this case I would want to remove the row 2,2,,. There may be multiple lines with missing data, and I don't necessarily know exactly which ones they are.
\documentclass{standalone}
\usepackage{pgfplots,pgfplotstable}
\pgfplotstableread[col sep=comma]{
a,b,c,d
1,1,1,1
2,2,,
3,3,3,3
}\data
\begin{document}
\pgfplotstabletypeset{\data}
\begin{tikzpicture}
\begin{axis}
\addplot table [x=a,y=b]{\data};
\end{axis}
\end{tikzpicture}
\end{document}

\pgfplotstablesavein the manual. I wonder if there is any way to do this if I don't know where the missing data might be? (Which could conceivably be more than one line.) I worry that with this approach I might get the index wrong one way or another. – Gareth Walker Oct 15 '18 at 17:47