MultiIndex.intersection()

MultiIndex.intersection(other) [source] Form the intersection of two MultiIndex objects, sorting if possible Parameters: other : MultiIndex or array / Index of tuples Returns: Index

Index.factorize()

Index.factorize(sort=False, na_sentinel=-1) [source] Encode the object as an enumerated type or categorical variable Parameters: sort : boolean, default False Sort by values na_sentinel: int, default -1 Value to mark ?not found? Returns: labels : the indexer to the original array uniques : the unique Index

pandas.get_dummies()

pandas.get_dummies(data, prefix=None, prefix_sep='_', dummy_na=False, columns=None, sparse=False, drop_first=False) [source] Convert categorical variable into dummy/indicator variables Parameters: data : array-like, Series, or DataFrame prefix : string, list of strings, or dict of strings, default None String to append DataFrame column names Pass a list with length equal to the number of columns when calling get_dummies on a DataFrame. Alternativly, prefix can be a dictionary mapping colu

TimedeltaIndex.nunique()

TimedeltaIndex.nunique(dropna=True) [source] Return number of unique elements in the object. Excludes NA values by default. Parameters: dropna : boolean, default True Don?t include NaN in the count. Returns: nunique : int

Indexing and Selecting Data

The axis labeling information in pandas objects serves many purposes: Identifies data (i.e. provides metadata) using known indicators, important for analysis, visualization, and interactive console display Enables automatic and explicit data alignment Allows intuitive getting and setting of subsets of the data set In this section, we will focus on the final point: namely, how to slice, dice, and generally get and set subsets of pandas objects. The primary focus will be on Series and DataFra

MultiIndex.ndim

MultiIndex.ndim return the number of dimensions of the underlying data, by definition 1

TimedeltaIndex.reshape()

TimedeltaIndex.reshape(*args, **kwargs) [source] NOT IMPLEMENTED: do not call this method, as reshaping is not supported for Index objects and will raise an error. Reshape an Index.

rpy2 / R interface

Warning In v0.16.0, the pandas.rpy interface has been deprecated and will be removed in a future version. Similar functionality can be accessed through the rpy2 project. See the updating section for a guide to port your code from the pandas.rpy to rpy2 functions. Updating your code to use rpy2 functions In v0.16.0, the pandas.rpy module has been deprecated and users are pointed to the similar functionality in rpy2 itself (rpy2 >= 2.4). Instead of importing import pandas.rpy.common as com

Series.dt.is_month_end

Series.dt.is_month_end Logical indicating if last day of month (defined by frequency)

Frequently Asked Questions (FAQ)

DataFrame memory usage As of pandas version 0.15.0, the memory usage of a dataframe (including the index) is shown when accessing the info method of a dataframe. A configuration option, display.memory_usage (see Options and Settings), specifies if the dataframe?s memory usage will be displayed when invoking the df.info() method. For example, the memory usage of the dataframe below is shown when calling df.info(): In [1]: dtypes = ['int64', 'float64', 'datetime64[ns]', 'timedelta64[ns]', ..