Pandas Flashcards
Attributes and underlying data
The index (row labels) of the DataFrame.
Dataframe.index
Attributes and underlying data
The column labels of the DataFrame.
Dataframe.columns
Attributes and underlying data
Return the dtypes in the DataFrame.
Dataframe.dtypes
Attributes and underlying data
Print a concise summary of a DataFrame.
Dataframe.info()
Attributes and underlying data
Return a subset of the DataFrame’s columns based on the column dtypes.
DataFrame.select_dtypes
Attributes and underlying data
Return a Numpy representation of the DataFrame.
Dataframe.values
Attributes and underlying data
Return a list representing the axes of the DataFrame.
Dataframe.axes
Attributes and underlying data
Return an int representing the number of axes / array dimensions.
Dataframe.ndim
Attributes and underlying data
Return an int representing the number of elements in this object.
Dataframe.size
Attributes and underlying data
Return the memory usage of each column in bytes.
Dataframe.memory_usage()
Attributes and underlying data
Return a tuple representing the dimensionality of the DataFrame.
Dataframe.shape
Conversion
Cast a pandas object to a specified dtype
Dataframe.astype()
Indexing, iteration
Return the first n rows.
Dataframe.head()
Indexing, iteration
Access a single value for a row/column pair by integer position.
Dataframe.iat
Indexing, iteration
Access a group of rows and columns by label(s) or a boolean array.
Dataframe.loc