I want to read a csv into a table that I defined like follows:
\begin{table}[bp]
\centering
\caption{Reading csv.}
\label{table:csv}
\begin{tabular}{cccc}
\toprule
\multirow{2}{1.4cm}{\parbox{1\linewidth}{\vspace{1mm}A}} & \multirow{2}{0.9cm}{\parbox{1\linewidth}{\vspace{1mm} \centering B}} & \multicolumn{2}{c}{C} \\ \cmidrule{3-4}
& & D & E \\ \midrule
A0 & B0 & D0 & E0 \\
A1 & B1 & D1 & E1 \\
A2 & B2 & D2 & E2 \\
\bottomrule
\end{tabular}
\end{table}
The .csv looks like:
,B,C,
,,D,E
A0,B0,D0,E0
A1,B1,D1,E1
A2,B2,D2,E2
And the table should look like:
- How can I read the .csv?
- How can A be centered in the column?
- Should the .csv contain the headers of the table (A, B, C, D and E) or that should come from latex only?
Thanks for the help
EDIT: Would it be easier/better if the .csv looks like this?
A,B,D,E
A0,B0,D0,E0
A1,B1,D1,E1
A2,B2,D2,E2


right?
– aripod Mar 11 '21 at 18:23