I am trying to code a table in latex that looks like this:
and my attempt is this one:
\documentclass{article}
\usepackage{array}
\usepackage{booktabs}
\begin{document}
\begin{table}[h]
\centering
\caption{description}
\begin{tabular}{r|ccc|ccc|}
\toprule
& \multicolumn{3}{c|}{\textbf{header 1}} & \multicolumn{3}{c|}{\textbf{header 2}} \\
\midrule
& \textbf{a} & \textbf{b} & \textbf{c} & \textbf{a} & \textbf{b} & \textbf{c} \\
\midrule
\textbf{row 1} & 1 & 1 & 1 & 1 & 1 & 1 \\
\textbf{row 2} & 1 & 1 & 1 & 1 & 1 & 1 \\
\textbf{row 3} & 1 & 1 & 1 & 1 & 1 & 1 \\
\midrule
\textbf{row 4} & \multicolumn{3}{c|}{0} & \multicolumn{3}{c|}{0} \\
\textbf{row 5} & \multicolumn{3}{c|}{0} & \multicolumn{3}{c|}{0} \\
\textbf{row 6} & \multicolumn{3}{c|}{0} & \multicolumn{3}{c|}{0} \\
\textbf{row 7} & \multicolumn{3}{c|}{0} & \multicolumn{3}{c|}{0} \\
\textbf{row 8} & \multicolumn{3}{c|}{0} & \multicolumn{3}{c|}{0} \\
\textbf{row 9} & \multicolumn{3}{c|}{0} & \multicolumn{3}{c|}{0} \\
\bottomrule
\end{tabular}
\label{tab:somelabel}
\end{table}
\end{document}
the problem is that some lines look incomplete and also I dont know how could some of the borders (top left) could be removed.
[h]
either.