I can use the csvsimple package to automatically display data from a CSV file in a tabular environment. Can the same be achieved in transposed (rows to columns and vice versa) form , as shown by the second hand-coded example?
\begin{filecontents*}{transpose.csv}
course,J,Js,F,Fs,G,Gs,T,Ts
1,4,4,4,4,3,3,5,5
2,3,7,2,6,2,5,4,9
3,4,11,3,9,5,10,2,11
4,2,13,7,16,3,13,7,18
5,7,20,3,19,7,20,7,25
6,5,25,3,23,7,27,2,27
7,3,28,5,28,2,29,3,30
8,6,34,4,32,7,36,3,33
9,4,38,2,34,3,39,7,40
10,4,42,2,36,6,45,2,42
\end{filecontents*}
\documentclass{article}
\usepackage{booktabs}
\usepackage{csvsimple}
\begin{document}
\centering
\begin{tabular}{rcccc}
\toprule
\# & Subj J & Subj F & Subj G & Subj T \\
\midrule
\csvreader[head to column names,late after line=\\]{transpose.csv}{}%
{\course & \J & \F & \G & \T}
\bottomrule
\end{tabular}
\vspace{2em}
\begin{tabular}{lcccccccccc}
\toprule
\# & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\
\midrule
Subj J & 4 & . & . & . & & & & & & 4 \\
Subj F & 4 & . & . & & & & & & . & 2 \\
Subj G & 3 & . & & & & & & . & . & 6 \\
Subj T & 5 & & & & & & . & . & . & 2 \\
\bottomrule
\end{tabular}
\end{document}
Graphically: top shows the current behaviour, bottom the desired output:
csvsimple
exists. Seems to be useful. As there is no option toscvreader
to transpose you seem have to do it yourself. See groups.google.com/forum/#!topic/comp.text.tex/K8UTcsocIJ0 for an awk script. If you only have a small amount of csv-data you can use MS Excel (at least the current version): Copy your data, right click (at some table sheet with enough room) and choose "transpose" from the context menu.