I would like to have help to fix a small formatting issue on the last row of the table below.
As you can notice, the values on this row are on a much different scale of the other ones on the table, so I think using the same formatting style (aligning the rows at the decimal marker) for them would not be ideal.
I was wondering if there a way in which I could have only the last row to have the values centered, with .
as the thousands separator, and ,
as the decimal marker -- while leaving the rest as it is formatted right now.
\documentclass[12pt]{article}
\usepackage{booktabs}
\usepackage[utf8]{inputenc}
\usepackage[skip=0.333\baselineskip]{caption}
\usepackage{newtxtext,newtxmath}
\usepackage[vmargin=3cm, hmargin=2.5cm]{geometry}
\usepackage[group-separator={.},
group-four-digits,
output-decimal-marker={,}]{siunitx}
\newcommand\mc{\multicolumn{1}{c}}
\begin{document}
\begin{table}[ht]
\setlength\extrarowheight{2pt}
\caption{Estatísticas Descritivas - Características pessoais e dos candidatos e tamanho das eleições no município -- 2016}
\centering
\begin{tabular}{lSSS}
\toprule
& \mc{Controle} & \mc{Tratado} & \mc{Total} \\
\midrule
Sexo & \\
\hspace{4mm} Mulheres (\%) & 12.4 & 12.1 & 12.4 \\
\hspace{4mm} Homens (\%) & 87.6 & 87.9 & 87.6 \\
\midrule
Cor & \\
\hspace{4mm} Brancos (\%) & 56.1 & 57.2 & 56.3 \\
\hspace{4mm} Amarelos ou Indígenas (\%) & 0.7 & 0.8 & 0.7 \\
\hspace{4mm} Pretos ou Pardos (\%) & 43.2 & 42.0 & 43.0 \\
\midrule
Escolaridade & \\
\hspace{4mm} Até Ensino Fundamental incompleto (\%) & 18.5 & 10.3 & 17.0 \\
\hspace{4mm} Até Ensino Médio incompleto (\%) & 18.1 & 15.1 & 17.5 \\
\hspace{4mm} Até Ensino Superior incompleto (\%) & 40.2 & 39.8 & 40.1 \\
\hspace{4mm} Ensino Superior completo (\%) & 23.2 & 34.8 & 25.4 \\
\midrule
Média do total de votos nominais no município & {21516.4} & {103050.7} & {37096.0} \\
\bottomrule
\end{tabular}
\end{table}
\end{document}