[EDIT Some how I missed @Gernot's comment. This answer is nothing more than an expanded version of what he wrote.]
I think that you have two problems.
- A typo:
tabular==|l|r|
should be tabular=|l|r|
.
- There are missing arguments to the
\csvreader
command that are supposed to say how the table should be constructed.
From your question it is not entirely clear to me what data.csv
looks like so I have used the file:
5.5
3806.0
601.0
26.8
150.0
2.0
75.0
21
Changing your MWE to
\documentclass{article}
\usepackage{csvsimple}
\begin{document}
\csvreader[tabular=|l|r|,
no head,
table head=\hline,
late after line=\\\hline]{data.csv}{}{\thecsvrow & \csvcoli}%
\end{document}
you now obtain the table:

Note that \thecsvrow
gives the row number and, for a given row, \csvcoli
gives the entry in column 1. There are also \csvcolii
, \csvcoliii
and so on. So the argument {\thecsvrow & \csvcoli}
to \csvreader
says that each of the table show start with the row index and then have the corresponding entry in column 1 of the data file.
Finally, I'd recommend reading the manual from the booktabs package as it explains why you shouldn't use vertical rules in tables:)
tabular
, there should be only one=
. 2.\csvreader
requires three regular arguments. 3. Try\csvreader[tabular=|l|r|,no head,table head=\hline,late after line=\\\hline]{data.csv}{}{\csvcoli & \csvcolii}
(note the second and third argument). 4. Read the fine manual. – gernot Aug 17 '16 at 15:52