# Help! Why do I get this badbox error?

\begin{frame}[fragile]{Class Data Example}
\begin{table}[htbp]
\begin{center}
\begin{tiny}
\begin{tabular}{p{8mm} p{8mm} p{10mm} p{8mm} p{8mm} p{10mm} p{10mm}} \hline
Student & Gender & Level & GPA & \raggedright Credit Hours  & Transport & Hours Slept \\ \hline
1 & M & Sophomore & 3.10 & 32 & Car & 7 \\
2 & M & Junior & 3.20 & 66 & Car & 8 \\
3 & F & Senior & 3.49 & 94 & Bus & 8 \\
4 & M & Senior & 2.68 & 89 & Walk & 10 \\
5 & F & Junior & 3.73 & 69 & Bicycle & 8 \\
6 & F & Junior & 3.39 & 59 & Car & 8 \\
7 & F & Senior & 3.80 & 86 & Walk & 8 \\
8 & M & Junior & 3.11 & 75 & Car & 8 \\
9 & F & Sophomore & 3.10 & 27 & Car & 7 \\
10 & M & Senior & 3.10 & 96 & Walk & 3 \\ \hline
\end{tabular}
\end{tiny}
\end{center}
\end{table}
\end{frame}


You have "bad box" warnings because the content of cells either doesn't properly fill the cell, or overfills it.

Below is an alternative without having to using smaller fonts. Instead, stack some of the column headings, perhaps consider abbreviations that are well-known.

\documentclass{beamer}

\usepackage{booktabs,makecell,siunitx}

\begin{document}

\begin{frame}{Class Data Example}
\centering
%\small
\begin{tabular}{ S[table-format = 2] c l c c l S[table-format = 2] }
\toprule
{Student} & Gender & Level & GPA & \makecell[b]{Credit \\ hours} & Transport & {\makecell[b]{Hours \\ slept}} \\
\midrule
1 & M & Soph & 3.10 & 32 & Car     &  7 \\
2 & M & Jr   & 3.20 & 66 & Car     &  8 \\
3 & F & Sr   & 3.49 & 94 & Bus     &  8 \\
4 & M & Sr   & 2.68 & 89 & Walk    & 10 \\
5 & F & Jr   & 3.73 & 69 & Bicycle &  8 \\
6 & F & Jr   & 3.39 & 59 & Car     &  8 \\
7 & F & Sr   & 3.80 & 86 & Walk    &  8 \\
8 & M & Jr   & 3.11 & 75 & Car     &  8 \\
9 & F & Soph & 3.10 & 27 & Car     &  7 \\
10 & M & Sr   & 3.10 & 96 & Walk    &  3 \\
\bottomrule
\end{tabular}
\end{frame}

\end{document}