# Don't do anything if CSV column is empty — How do I achieve this?

MWE (actually not totally MWE, but I think it's easier to see what happens this way):

\documentclass{article}
\usepackage{csvsimple}
\usepackage{graphicx}

\begin{document}
\setlength\unitlength{1cm}

\vfill
\artist

\includegraphics[height=37mm]{\filenameone}

\includegraphics[height=37mm]{\filenametwo}

\comment
}
\end{document}


Content of jobname2.csv:

artist,filenameone,filenametwo,comment
Foo,example-image-a,example-image-b,Nothing
Foobar,example-image-a,,Something


When there is nothing in the filenametwo column, I don't want anything done (not sure how to express that properly).

csvsimple provides a macro \ifcsvstrequal{X}{Y}{equal}{not equal} to conditionally execute code if the two parameters X and Y are equal or not (basically an \ifx of two \edef-ed token lists). You can use that macro in your example without the need for extra packages like xstring:

\documentclass{article}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.csv}
artist,filenameone,filenametwo,comment
Foo,example-image-a,example-image-b,Nothing
Foobar,example-image-a,,Something
Bar,,example-image-b,Anything
\end{filecontents*}

\usepackage{csvsimple}
\usepackage{graphicx}

\begin{document}
\setlength\unitlength{1cm}

\vfill
\artist

\ifcsvstrequal{\filenameone}{}{(no first image)}{%
\includegraphics[height=37mm]{\filenameone}
}
\ifcsvstrequal{\filenametwo}{}{(no second image)}{%
\includegraphics[height=37mm]{\filenametwo}
}

\comment
}
\end{document}