\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Daryabi} \pdfinfo{ /Title (pandas.pdf) /Creator (Cheatography) /Author (Daryabi) /Subject (Pandas Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{A3A3A3} \definecolor{LightBackground}{HTML}{F3F3F3} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Pandas Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Daryabi} via \textcolor{DarkBackground}{\uline{cheatography.com/181709/cs/37790/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Daryabi \\ \uline{cheatography.com/daryabi} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 18th March, 2023.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{x{1.9908 cm} x{2.9862 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Creating Series}} \tn % Row 0 \SetRowColor{LightBackground} From a list: & series = pd.Series(my\_list) \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} From a dictionary: & series = pd.Series(my\_dict) \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} From a NumPy array: & series = pd.Series(my\_array) \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.84609 cm} x{4.13091 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Constructor}} \tn % Row 0 \SetRowColor{LightBackground} data & used to pass the data for the Series. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} index & used to specify the index labels for the Series \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} dtype & used to specify the data type of the Series \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} copy & used to specify whether to make a copy of the data or not \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} name & used to give a name to the Series \tn % Row Count 9 (+ 1) % Row 5 \SetRowColor{white} \seqsplit{example:} & pd.Series(data=my\_data, index=my\_index) \tn % Row Count 11 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.89586 cm} x{4.08114 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Series Attributes}} \tn % Row 0 \SetRowColor{LightBackground} values & Returns a NumPy array containing the values of the Series \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} index & Returns the index labels of the Series \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} shape & Returns the dimensions of the Series in the form of a tuple. \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} size & Returns the number of elements in the Series. \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} name & Returns the name of the Series. \tn % Row Count 9 (+ 1) % Row 5 \SetRowColor{white} dtype & Returns the data type of the values in the Series. \tn % Row Count 11 (+ 2) % Row 6 \SetRowColor{LightBackground} \seqsplit{is\_unique} & Boolean value indicating whether all the values in the Series are unique or not. \tn % Row Count 14 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.29402 cm} x{3.68298 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Data Selection}} \tn % Row 0 \SetRowColor{LightBackground} head() & Return the first n rows of the Series (default value of n is 5). \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} tail() & Return the last n rows of the Series (default value of n is 5). \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} sample() & Return a random sample of the Series. \tn % Row Count 8 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{value\_counts()} & Count the number of occurrences of each unique value in the Series. \tn % Row Count 11 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.69218 cm} x{3.28482 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Sorting}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{sort\_values()} & Sort the Series by value. \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} sort\_index() & Sort the Series by index. \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.9954 cm} x{3.9816 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Math}} \tn % Row 0 \SetRowColor{LightBackground} count() & Return the number of non-missing values in the Series. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} sum() & Return the sum of the values in the Series. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} mean() & Return the mean of the values in the Series. \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} min() & Return the minimum value in the Series. \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} max() & Return the maximum value in the Series. \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} \seqsplit{describe()} & Generate descriptive statistics for the Series. \tn % Row Count 12 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Python Functions}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{\# \seqsplit{len/type/dir/sorted/max/min} \newline % Row Count 1 (+ 1) ` {\bf{type(students\_series)}} ` \newline % Row Count 2 (+ 1) \# type conversion \newline % Row Count 3 (+ 1) ` {\bf{list(marks\_series)}}` \newline % Row Count 4 (+ 1) \# Arithmetic Operators(Broadcasting) \newline % Row Count 5 (+ 1) ` 100 + marks\_series`% Row Count 6 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.44333 cm} x{3.53367 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Indexing}} \tn % Row 0 \SetRowColor{LightBackground} Fancy Indexing & students{[}{[}1,3,4,5{]}{]} , students{[}{[}'A','B'{]}{]} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} Boolean Indexing & stduent\_mark{[}student\_mark \textgreater{}= 50{]} \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} Normal Indexing & student{[}1{]} , students{[}1:2{]} , students{[}::2{]} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} Error & students{[}{[}1:2{]}{]} , student{[}-1{]} \tn % Row Count 8 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.89586 cm} x{4.08114 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Plotting}} \tn % Row 0 \SetRowColor{LightBackground} plot() & Creates a line plot of the Series. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} bar() & Creates a vertical bar plot of the Series. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} hist() & Creates a histogram plot of the Series. \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{scatter()} & Creates a scatter plot of the Series. \tn % Row Count 8 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.74655 cm} x{4.23045 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Plot()}} \tn % Row 0 \SetRowColor{LightBackground} kind & The type of plot to create, e.g., 'line', 'bar', 'hist', 'kde', 'pie', etc. Defaults to 'line' \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} title & The title of the plot. \tn % Row Count 4 (+ 1) % Row 2 \SetRowColor{LightBackground} \seqsplit{xlabel} & The label for the x-axis \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} \seqsplit{ylabel} & The label for the y-axis. \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} color & The color of the plot. \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} \seqsplit{legend} & Whether or not to show a legend. Defaults to True. \tn % Row Count 9 (+ 2) % Row 6 \SetRowColor{LightBackground} \seqsplit{figsize} & The size of the plot figure in inches. \tn % Row Count 11 (+ 2) % Row 7 \SetRowColor{white} grid & Whether or not to show a grid. Defaults to True. \tn % Row Count 13 (+ 2) % Row 8 \SetRowColor{LightBackground} \seqsplit{xticks} & he positions of the x-axis ticks. \tn % Row Count 14 (+ 1) % Row 9 \SetRowColor{white} \seqsplit{yticks} & Additional parameters for the specific plot \tn % Row Count 16 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.4931 cm} x{3.4839 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Data Manipulation:}} \tn % Row 0 \SetRowColor{LightBackground} astype() & Convert the data type of the values in the Series to a specified data type. \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} between() & Return a Boolean Series indicating whether each element is between two values (inclusive). \tn % Row Count 7 (+ 4) % Row 2 \SetRowColor{LightBackground} clip() & Limit the values in the Series to a specified range. \tn % Row Count 9 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{drop\_duplicates()} & Remove duplicate values from the Series. \tn % Row Count 11 (+ 2) % Row 4 \SetRowColor{LightBackground} dropna() & Remove missing values from the Series. \tn % Row Count 13 (+ 2) % Row 5 \SetRowColor{white} fillna() & Fill missing values in the Series with a specified value or method. \tn % Row Count 16 (+ 3) % Row 6 \SetRowColor{LightBackground} isin() & Determine whether each element is in a specified set of values. \tn % Row Count 19 (+ 3) % Row 7 \SetRowColor{white} apply() & Apply a function to each element of the Series. \tn % Row Count 21 (+ 2) % Row 8 \SetRowColor{LightBackground} map() & Map values of the Series to a new set of values. \tn % Row Count 23 (+ 2) % Row 9 \SetRowColor{white} copy() & Create a copy of the Series. \tn % Row Count 24 (+ 1) % Row 10 \SetRowColor{LightBackground} hasnans() & Return a Boolean value indicating whether the Series contains any missing values. \tn % Row Count 27 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.74655 cm} x{4.23045 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{DataFrame Attributes}} \tn % Row 0 \SetRowColor{LightBackground} shape & returns a tuple representing the dimensions of the DataFrame \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} index & returns the row index labels of the DataFrame. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{columns} & returns the column index labels of the DataFrame. \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{values} & returns a NumPy array containing the data of the DataFrame. \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \seqsplit{dtypes} & returns a Series containing the data types of each column in the DataFrame. \tn % Row Count 11 (+ 3) % Row 5 \SetRowColor{white} size & returns the total number of elements in the DataFrame. \tn % Row Count 13 (+ 2) % Row 6 \SetRowColor{LightBackground} ndim & returns the number of dimensions of the DataFrame. \tn % Row Count 15 (+ 2) % Row 7 \SetRowColor{white} empty & returns a Boolean value indicating whether the DataFrame is empty or not. \tn % Row Count 18 (+ 3) % Row 8 \SetRowColor{LightBackground} axes & returns a list containing the row and column axis labels of the DataFrame. \tn % Row Count 21 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.84609 cm} x{4.13091 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{DataFrame Indexing and selecting data}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{head()} & returns the first n rows of a DataFrame \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{tail()} & returns the last n rows of a DataFrame \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{sample()} & returns a random sample of a DataFrame \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} loc{[}{]} & label-based indexing for selecting rows and columns \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} iloc{[}{]} & integer-based indexing for selecting rows and columns \tn % Row Count 10 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.29402 cm} x{3.68298 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Descriptive statistics:}} \tn % Row 0 \SetRowColor{LightBackground} info() & prints information about a DataFrame, including data types and non-null values \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \seqsplit{describe()} & provides summary statistics for numerical columns \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{value\_counts()} & counts the unique values in a column \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} unique() & returns an array of unique values in a column \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} nunique() & returns the number of unique values in a column \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} rank() & returns the rank of each value in a column \tn % Row Count 13 (+ 2) % Row 6 \SetRowColor{LightBackground} corr() & calculates the correlation between columns \tn % Row Count 15 (+ 2) % Row 7 \SetRowColor{white} \seqsplit{nlargest()} & returns the n largest values in a column \tn % Row Count 17 (+ 2) % Row 8 \SetRowColor{LightBackground} \seqsplit{nsmallest()} & returns the n smallest values in a column \tn % Row Count 19 (+ 2) % Row 9 \SetRowColor{white} max() & returns the maximum value in a column \tn % Row Count 21 (+ 2) % Row 10 \SetRowColor{LightBackground} min() & returns the minimum value in a column \tn % Row Count 23 (+ 2) % Row 11 \SetRowColor{white} mean() & returns the mean of values in a column \tn % Row Count 25 (+ 2) % Row 12 \SetRowColor{LightBackground} var() & returns the variance of values in a column \tn % Row Count 27 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.24425 cm} x{3.73275 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Data manipulation:}} \tn % Row 0 \SetRowColor{LightBackground} rename() & renames columns or index labels of a DataFrame \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} .astype() & converts the data type of a column \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{sort\_values()} & sorts a DataFrame by values \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \seqsplit{set\_index()} & sets a column as the DataFrame's index \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} \seqsplit{reset\_index()} & resets the DataFrame's index to a default range index \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} \seqsplit{sort\_index()} & sorts the DataFrame by index values \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} drop() & removes rows or columns from a DataFrame \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} apply() & applies a function to each element of a DataFrame \tn % Row Count 16 (+ 2) % Row 8 \SetRowColor{LightBackground} isin() & checks whether each element of a DataFrame is contained in a list of values \tn % Row Count 19 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.4931 cm} x{3.4839 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Missing data}} \tn % Row 0 \SetRowColor{LightBackground} isnull() & returns a boolean DataFrame indicating missing values \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} notnull() & returns a boolean DataFrame indicating non-missing values \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} dropna() & removes rows or columns containing missing values \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} fillna() & fills missing values with a specified value or method \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} \seqsplit{duplicated()} & returns a boolean Series indicating duplicate rows \tn % Row Count 11 (+ 2) % Row 5 \SetRowColor{white} \seqsplit{drop\_duplicates()} & removes duplicate rows \tn % Row Count 13 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.84609 cm} x{4.13091 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Other}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{size()} & returns the number of elements in a DataFrame \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{insert()} & inserts a column into a DataFrame at a specified location \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \seqsplit{copy()} & creates a copy of a DataFrame \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}