Is it possible with pgfplotstable to check if a cell is not empty and put a \midrule before this row?
For example I have the names of a sample in the first column and before every new sample I want a \midrule. If every sample has the same amount of rows I could use the every nth row option of pgfplotstable.
But how can I solve this, if the amount of rows per sample is not the same? Here a MWE which illustrates the problem:
\documentclass{article}
\usepackage{pgfplotstable, booktabs}
\begin{filecontents}{dataC.csv}
Name, pH, concentration
Sample 1, 1.01, 1.52
, 1.00, 1.51
, 1.02, 1.53
Sample 2, 2.01, -1.52
, 2.00, -1.51
, 2.02, -1.53
Sample 3, 3.01, -2.52
, 3.00, -2.51
Sample 4, 4.01, -3.52
, 4.00, -3.51
, 4.02, -4.53
, 4.01, -3.51
, 4.03, -3.54
Sample 5, 5.01, -4.52
, 5.00, -4.51
, 5.02, -4.53
\end{filecontents}
\begin{document}
\pgfplotstableset{col sep=comma}
\pgfplotstabletypeset[
columns={Name, pH, concentration},
fixed zerofill,
columns/Name/.style={string type,},
every head row/.style={before row=\toprule, after row=\midrule},
every last row/.style={after row=\bottomrule},
every nth row={3}{before row=\midrule},
]{dataC.csv}
\end{document}

every row no. I could accept this answer if it would be possible to use a counter as row number and increase it manually by\addtocounterbut this is not possible in the optional argument ofpgfplotstypeset. Do you have an idea how to solve this? At least for an idea I would be really thankful. – Schewerle Jan 23 '17 at 15:01