“! LaTeX Error: Environment table undefined.” in minimal documentclass [duplicate]

I was about to put together an MWE for testing pgfplotstable when pdflatex gave me the error:

! LaTeX Error: Environment table undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...

l.6 \begin{table}


I've already loaded all the packages I used in my main document, which displayed a table. I was not able to find the answer to this simple issue, which is probably due to some silly mistake I can not find.

The MWE:

\documentclass{minimal}
\usepackage{booktabs,pgfplotstable}
\begin{document}
\begin{table}
\centering
\begingroup\makeatletter\@makeother\_
\pgfplotstabletypeset[
% columns={index[0],index[1]}
col sep=comma,
columns/Name/.style={string type},
columns/misc/.style={string type},
before row={\toprule},
after row={
\midrule
}
},
every last row/.style={after row=\bottomrule},
]{cermaic_chip_capacitors.csv}
\endgroup
\end{table}
\end{document}

• Isn't the error message clear? minimal class only defines the absolute minimum that does not generate an error on loading, so it doesn't define tables (or figures, or lists or set up fonts) – David Carlisle Feb 3 at 12:26

minimal class only defines the absolute minimum that does not generate an error on loading, so it doesn't define tables or figures, or lists or set up fonts.
LaTeX does not define table or figure environments or commands like \section these are just defined (or not defined) by the document class in use.
I've used minimal documentclass. Now I recall that I've read a few times that minimal class should be shunned, though I can not provide the details of why this is the case.
Changing the documentclass to article has solved all the problems, and now the latex source works as intended.