\documentclass{article}
% translate with >> pdflatex -shell-escape <file>

% This file is an extract of the PGFPLOTS manual, copyright by Christian Feuersaenger.
% 
% Feel free to use it as long as you cite the pgfplots manual properly.
%
% See
%   http://pgfplots.sourceforge.net/pgfplots.pdf
% for the complete manual.
%
% Any required input files (for <plot table> or <plot file> or the table package) can be downloaded
% at
% http://www.ctan.org/tex-archive/graphics/pgf/contrib/pgfplots/doc/latex/
% and
% http://www.ctan.org/tex-archive/graphics/pgf/contrib/pgfplots/doc/latex/plotdata/

\usepackage{pgfplots}
\pgfplotsset{compat=newest}

\pagestyle{empty}

\usepackage{pgfplotstable}
\usepackage{array}
\usepackage{colortbl}
\usepackage{booktabs}
\usepackage{eurosym}
\usepackage{amsmath}
\usepackage{pgfplotstable}

\begin{document}
\pgfplotstableread{pgfplotstable.example1.dat}\loadedtable
\pgfplotstablecreatecol[
	create col/assign/.code={%
		\getthisrow{level}\entry
		\getnextrow{level}\nextentry
		\edef\entry{thisrow=\entry; nextrow=\nextentry. 
			(\#\pgfplotstablerow/\pgfplotstablerows)}%
		\pgfkeyslet{/pgfplots/table/create col/next content}\entry
	}]
	{new}\loadedtable

\pgfplotstabletypeset[
	column type=l,
	columns={level,new},
	columns/new/.style={string type}
]\loadedtable
\end{document}
