code
stringlengths
3
6.57k
name(s)
df.sort_index(by=['A', 'B'], ascending=[True, False])
self._get_axis_number(axis)
AssertionError('Axis must be 0 or 1, got %s' % str(axis)
self._get_axis(axis)
isinstance(by, list)
com.is_sequence(ascending)
len(by)
len(ascending)
ValueError('Length of ascending (%d)
len(ascending)
len(by)
len(by)
trans(v)
com.needs_i8_conversion(v)
v.view('i8')
ValueError('Cannot sort by duplicate column %s' % str(x)
keys.append(trans(k)
com._ensure_platform_int(indexer)
isinstance(self.columns, MultiIndex)
str(by)
str(by)
isinstance(ascending, (tuple, list)
isinstance(labels, MultiIndex)
labels.is_lexsorted()
MultiIndex.from_tuples(labels.values)
com._ensure_platform_int(indexer)
self._get_block_manager_axis(axis)
self._update_inplace(new_data)
self._constructor(new_data)
__finalize__(self)
levels (in order)
self._get_axis_number(axis)
self._get_axis(axis)
isinstance(the_axis, MultiIndex)
TypeError('can only sort by level with a hierarchical index')
self.reindex(**{ax: new_axis})
self.take(indexer, axis=axis, convert=False)
self._get_block_manager_axis(axis)
self._update_inplace(new_data)
self._constructor(new_data)
__finalize__(self)
swaplevel(self, i, j, axis=0)
string (can be mixed)
caller (new object)
self.copy()
self._get_axis_number(axis)
result.index.swaplevel(i, j)
result.columns.swaplevel(i, j)
reorder_levels(self, order, axis=0)
number (position)
key (label)
caller (new object)
self._get_axis_number(axis)
isinstance(self._get_axis(axis)
TypeError('Can only reorder levels on a hierarchical axis.')
self.copy()
result.index.reorder_levels(order)
result.columns.reorder_levels(order)
_combine_frame(self, other, func, fill_value=None, level=None)
self.align(other, join='outer', level=level, copy=False)
_arith_op(left, right)
isnull(left)
isnull(right)
left.copy()
right.copy()
func(left, right)
f(col)
_arith_op(this[col].values, other[col].values)
dict([(col, f(col)
f(i)
f(i)
enumerate(this.columns)
self._constructor(result, index=new_index, copy=False)
_arith_op(this.values, other.values)
self._get_axis_name(axis)
self._combine_match_index(other, func, level=level, fill_value=fill_value)
self._combine_match_columns(other, func, level=level, fill_value=fill_value)
self._combine_series_infer(other, func, level=level, fill_value=fill_value)
_combine_series_infer(self, other, func, level=None, fill_value=None)
len(other)
len(self)
self._combine_match_index(other, func, level=level, fill_value=fill_value)
self._combine_match_columns(other, func, level=level, fill_value=fill_value)
_combine_match_index(self, other, func, level=None, fill_value=None)
self.align(other, join='outer', axis=0, level=level, copy=False)
self._constructor(func(left.values.T, right.values)
_combine_match_columns(self, other, func, level=None, fill_value=None)
self.align(other, join='outer', axis=1, level=level, copy=False)
self._constructor(new_data)
_combine_const(self, other, func, raise_on_error=True)
self._data.eval(func=func, other=other, raise_on_error=raise_on_error)
self._constructor(new_data)
_compare_frame_evaluate(self, other, func, str_rep)
_compare(a, b)
dict([(col, func(a[col], b[col])
expressions.evaluate(_compare, str_rep, self, other)
_compare(a, b)
dict([(i, func(a.iloc[:, i], b.iloc[:, i])
enumerate(a.columns)