Module ImportFrom alias alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias Import alias identifier Import alias identifier Import alias identifier FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad Str NameLoad NameLoad NameLoad Str body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call NameLoad NameLoad keyword NameLoad keyword Num Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore CompareIsNot NameLoad NameLoad If NameLoad body If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad orelse Assign NameStore NameLoad Assign NameStore ListLoad NameLoad orelse Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If NameLoad body Assign NameStore ListLoad For NameStore BinOpAdd NameLoad NameLoad body If Call NameLoad NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr TryExcept body If CompareIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Pass If CompareLt Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad If CompareGt AttributeLoad AttributeLoad NameLoad attr attr Num body Assign NameStore ListComp BoolOpOr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad NameLoad comprehension NameStore Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num handlers ExceptHandler type NameLoad body Pass TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num handlers ExceptHandler type NameLoad body Pass If Call NameLoad NameLoad NameLoad body If Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword Num orelse Assign NameStore Call AttributeLoad NameLoad attr keyword Num If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword Str If NameLoad body If NameLoad body Assign NameStore SubscriptLoad NameLoad Index Call AttributeLoad Call AttributeLoad NameLoad attr attr keyword Num Assign NameStore Call NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If BoolOpAnd NameLoad UnaryOpNot NameLoad UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Num If BoolOpAnd CompareEq Call NameLoad NameLoad Num CompareGt Call NameLoad NameLoad Num body Assign NameStore AttributeLoad NameLoad attr Return NameLoad decorator_list Assign AttributeStore NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str body If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign NameStore Call AttributeLoad Str attr NameLoad For NameStore AttributeLoad AttributeLoad NameLoad attr attr body If CompareIn NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Raise Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad If Call NameLoad NameLoad Str body For NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Slice Num body If CompareIn NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Raise Call NameLoad NameLoad If CompareGt Call NameLoad NameLoad Num body Assign NameStore BinOpAdd TupleLoad NameLoad BinOpMult TupleLoad Str BinOpSub Call NameLoad NameLoad Num orelse Assign NameStore NameLoad If BoolOpAnd UnaryOpNot NameLoad Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr Call NameLoad Dict NameLoad SubscriptLoad NameLoad Index NameLoad If NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Return NameLoad Assign TupleStore NameStore NameStore NameStore NameLoad orelse Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Return NameLoad Assign TupleStore NameStore NameStore NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Num Assign NameStore AttributeLoad Call NameLoad NameLoad keyword ListLoad NameLoad attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str body If NameLoad body Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr body TryExcept body If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad Call Call NameLoad NameLoad NameLoad orelse If Call NameLoad NameLoad NameLoad body If Call NameLoad SubscriptLoad NameLoad Index NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad Call Call NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad Call SubscriptLoad NameLoad Index NameLoad NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Pass Return NameLoad orelse Return Dict NameLoad Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str body If CompareGt Call NameLoad NameLoad Num body Assign NameStore ListLoad Assign NameStore ListLoad FunctionDef arguments args NameParam defaults body Return BinOpAdd TupleLoad NameLoad NameLoad BinOpMult TupleLoad Str BinOpSub Call NameLoad NameLoad Num decorator_list If CompareGt Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Index BinOpAdd NameLoad NameLoad attr NameLoad attr NameLoad Assign NameStore Num For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword Num keyword NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr TryExcept body Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore NameLoad Assign NameStore Num For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword Num keyword NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index NameLoad keyword ListLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad If CompareEq Call NameLoad NameLoad Num body Return NameLoad orelse Assign NameStore NameLoad Assign NameStore AttributeLoad NameLoad attr If CompareGt Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Index BinOpAdd NameLoad NameLoad attr NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpAdd ListLoad Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Assign NameStore Call NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Str body If CompareGt Call NameLoad NameLoad Num body Assign NameStore ListLoad FunctionDef arguments args defaults body If CompareEq Call NameLoad NameLoad Num body Return NameLoad Return BinOpAdd TupleLoad NameLoad BinOpMult TupleLoad Str BinOpSub Call NameLoad NameLoad Num decorator_list If CompareGt Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad attr NameLoad Assign NameStore Call NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr keyword Num keyword Num attr NameLoad Assign NameStore Call NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad orelse Assign NameStore NameLoad Assign NameStore AttributeLoad NameLoad attr If Call NameLoad NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad attr NameLoad orelse Assign NameStore Call NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareIs NameLoad NameLoad body Assign NameStore ListLoad orelse If BoolOpOr Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad TupleLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Call NameLoad NameLoad Str body Assign NameStore ListLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword Str Assign NameStore Call NameLoad NameLoad NameLoad keyword Str Assign NameStore Dict Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad If BoolOpAnd CompareIs NameLoad NameLoad CompareIsNot NameLoad NameLoad body Raise Call NameLoad Str If BoolOpAnd CompareIsNot NameLoad NameLoad CompareIs NameLoad NameLoad body Raise Call NameLoad Str If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Str Num Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Num attr AttributeLoad NameLoad attr orelse Assign SubscriptStore NameLoad Index Str NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If BoolOpAnd UnaryOpNot Call NameLoad NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Dict Num Num Str Str TryExcept body Assign NameStore SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str If CompareIs NameLoad NameLoad body Assign NameStore Dict Str Str Str Lambda arguments args NameParam defaults BinOpDiv NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr keyword Num attr keyword Num Lambda arguments args NameParam defaults BinOpDiv NameLoad Call AttributeLoad NameLoad attr Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Num keyword Num Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index Str TryExcept body Assign NameStore SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num orelse If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index Str attr Str Assign NameStore Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Index Str Slice attr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str keyword Num attr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad If CompareEq NameLoad Str body Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad ListLoad NameLoad NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Num orelse If CompareEq NameLoad Str body Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num orelse If BoolOpOr CompareEq NameLoad Str CompareIs NameLoad NameLoad body Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index Str Num Assign NameStore Call NameLoad ListLoad NameLoad NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num orelse Raise Call NameLoad Str orelse Raise Call NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body If CompareIs NameLoad NameLoad body Assign NameStore ListLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body If BoolOpAnd Call NameLoad NameLoad NameLoad CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad orelse If CompareNotEq Call NameLoad NameLoad Call NameLoad NameLoad body Raise Call NameLoad Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Return NameLoad decorator_list
N/A pandas Series DataFrame pandas.core.index MultiIndex Index pandas.core.groupby Grouper pandas.tools.merge concat pandas.tools.util cartesian_product pandas.compat range lrange zip pandas compat N/A pandas.core.common com N/A pandas.lib lib N/A numpy np pivot_table N/A N/A data values index columns aggfunc fill_value margins dropna margins_name N/A None None None mean None False True All N/A N/A 
    Create a spreadsheet-style pivot table as a DataFrame. The levels in the
    pivot table will be stored in MultiIndex objects (hierarchical indexes) on
    the index and columns of the result DataFrame

    Parameters
    ----------
    data : DataFrame
    values : column to aggregate, optional
    index : column, Grouper, array, or list of the previous
        If an array is passed, it must be the same length as the data. The list
        can contain any of the other types (except list).
        Keys to group by on the pivot table index.  If an array is passed, it
        is being used as the same manner as column values.
    columns : column, Grouper, array, or list of the previous
        If an array is passed, it must be the same length as the data. The list
        can contain any of the other types (except list).
        Keys to group by on the pivot table column.  If an array is passed, it
        is being used as the same manner as column values.
    aggfunc : function or list of functions, default numpy.mean
        If list of functions passed, the resulting pivot table will have
        hierarchical columns whose top level are the function names (inferred
        from the function objects themselves)
    fill_value : scalar, default None
        Value to replace missing values with
    margins : boolean, default False
        Add all row / columns (e.g. for subtotal / grand totals)
    dropna : boolean, default True
        Do not include columns whose entries are all NaN
    margins_name : string, default 'All'
        Name of the row / column that will contain the totals
        when margins is True.

    Examples
    --------
    >>> df
       A   B   C      D
    0  foo one small  1
    1  foo one large  2
    2  foo one large  2
    3  foo two small  3
    4  foo two small  3
    5  bar one large  4
    6  bar one small  5
    7  bar two small  6
    8  bar two large  7

    >>> table = pivot_table(df, values='D', index=['A', 'B'],
    ...                     columns=['C'], aggfunc=np.sum)
    >>> table
              small  large
    foo  one  1      4
         two  6      NaN
    bar  one  5      4
         two  6      7

    Returns
    -------
    table : DataFrame
     N/A index N/A _convert_by index N/A columns N/A _convert_by columns N/A N/A isinstance aggfunc list N/A N/A pieces N/A N/A keys N/A N/A func aggfunc N/A N/A table N/A pivot_table data values values index index columns columns fill_value fill_value aggfunc func margins margins N/A N/A N/A pieces append table N/A N/A N/A keys append N/A func __name__ N/A N/A concat pieces keys keys axis 1 N/A keys N/A index columns N/A values_passed N/A values None N/A values_passed N/A N/A N/A N/A com is_list_like values N/A N/A values_multi True N/A values N/A list values N/A N/A values_multi False N/A values N/A values N/A N/A values N/A list N/A N/A N/A data columns drop keys N/A values_passed N/A N/A to_filter N/A N/A x N/A keys values N/A N/A N/A isinstance x Grouper N/A N/A x N/A x key N/A N/A N/A N/A x data N/A N/A N/A N/A to_filter append x N/A N/A N/A TypeError N/A N/A N/A N/A N/A len to_filter N/A len N/A data columns N/A N/A data N/A data N/A to_filter N/A grouped N/A N/A data groupby keys N/A agged N/A N/A grouped agg aggfunc N/A table agged N/A N/A N/A N/A table index nlevels 1 N/A N/A to_unstack N/A N/A N/A N/A N/A agged index names N/A i i N/A i N/A range N/A len index N/A len keys N/A table N/A N/A agged unstack to_unstack N/A N/A dropna N/A N/A N/A N/A m N/A N/A MultiIndex from_arrays N/A cartesian_product N/A N/A table index levels names N/A N/A table index names N/A table N/A N/A table reindex_axis m axis 0 N/A N/A N/A AttributeError N/A N/A N/A N/A N/A m N/A N/A MultiIndex from_arrays N/A cartesian_product N/A N/A table columns levels names N/A N/A table columns names N/A table N/A N/A table reindex_axis m axis 1 N/A N/A N/A AttributeError N/A N/A N/A N/A isinstance table DataFrame N/A N/A N/A isinstance N/A table columns MultiIndex N/A N/A table N/A N/A table sortlevel axis 1 N/A N/A table N/A N/A table sort_index axis 1 N/A N/A fill_value None N/A N/A table N/A N/A table fillna value fill_value downcast infer N/A margins N/A N/A dropna N/A N/A data N/A data N/A N/A N/A N/A N/A data notnull all axis 1 N/A table N/A _add_margins table data values rows index cols columns aggfunc aggfunc margins_name margins_name N/A N/A values_passed N/A values_multi N/A N/A table empty N/A N/A table N/A table N/A N/A values N/A 0 N/A N/A N/A N/A len index 0 N/A N/A len columns 0 N/A N/A table N/A table T N/A table N/A N/A N/A DataFrame pivot_table pivot_table _add_margins N/A N/A table data values rows cols aggfunc margins_name N/A All N/A N/A N/A N/A isinstance margins_name N/A compat string_types N/A N/A N/A ValueError margins_name argument must be a string N/A exception_msg N/A N/A Conflicting name "{0}" in margins format margins_name N/A level N/A N/A table index names N/A N/A N/A margins_name N/A N/A N/A table index get_level_values level N/A N/A N/A ValueError exception_msg N/A grand_margin N/A _compute_grand_margin data values aggfunc margins_name N/A N/A hasattr table columns N/A N/A level N/A N/A N/A table columns names N/A 1 N/A N/A N/A margins_name N/A N/A N/A table columns get_level_values level N/A N/A N/A ValueError exception_msg N/A N/A N/A len rows 1 N/A N/A key N/A N/A margins_name N/A N/A N/A N/A len rows 1 N/A N/A key margins_name N/A N/A N/A values N/A isinstance table Series N/A N/A N/A N/A table append N/A Series N/A key N/A grand_margin N/A margins_name N/A values N/A N/A marginal_result_set N/A _generate_marginal_results table data values rows cols aggfunc grand_margin margins_name N/A N/A N/A isinstance marginal_result_set tuple N/A N/A marginal_result_set N/A N/A result margin_keys row_margin marginal_result_set N/A N/A marginal_result_set N/A _generate_marginal_results_without_values table data rows cols aggfunc margins_name N/A N/A N/A isinstance marginal_result_set tuple N/A N/A marginal_result_set N/A N/A result margin_keys row_margin marginal_result_set N/A row_margin N/A N/A row_margin reindex N/A result columns N/A k margin_keys N/A N/A N/A isinstance k N/A compat string_types N/A N/A N/A row_margin N/A k N/A grand_margin N/A k N/A N/A N/A row_margin N/A k N/A grand_margin N/A N/A k N/A 0 N/A margin_dummy N/A N/A DataFrame row_margin columns N/A key T N/A row_names N/A N/A result index names N/A N/A N/A result N/A N/A result append margin_dummy N/A N/A N/A TypeError N/A N/A N/A result index N/A N/A N/A result index _to_safe_for_reshape N/A result N/A N/A result append margin_dummy N/A N/A N/A result index names row_names N/A result N/A _compute_grand_margin N/A N/A data values aggfunc margins_name N/A All N/A N/A values N/A N/A grand_margin N/A N/A N/A k v N/A N/A N/A data N/A values iteritems N/A N/A N/A N/A N/A isinstance aggfunc N/A compat string_types N/A N/A N/A grand_margin N/A k N/A N/A getattr v aggfunc N/A N/A N/A isinstance aggfunc dict N/A N/A N/A isinstance N/A aggfunc N/A k N/A compat string_types N/A N/A N/A grand_margin N/A k N/A N/A getattr v N/A aggfunc N/A k N/A N/A N/A grand_margin N/A k N/A N/A aggfunc N/A k v N/A N/A N/A grand_margin N/A k N/A aggfunc v N/A N/A N/A TypeError N/A N/A N/A grand_margin N/A N/A N/A margins_name N/A aggfunc N/A data index N/A _generate_marginal_results N/A N/A table data values rows cols aggfunc grand_margin margins_name N/A All N/A N/A N/A N/A len cols 0 N/A N/A table_pieces N/A N/A margin_keys N/A _all_key N/A N/A key N/A N/A N/A N/A N/A key margins_name N/A N/A N/A N/A len cols 1 N/A N/A N/A N/A len rows 0 N/A N/A margin N/A N/A N/A N/A N/A data N/A N/A rows values groupby rows agg aggfunc N/A cat_axis 1 N/A N/A key piece N/A N/A table groupby level 0 axis cat_axis N/A N/A all_key N/A _all_key key N/A piece N/A N/A piece copy N/A N/A N/A N/A piece N/A all_key N/A margin N/A key N/A N/A N/A TypeError N/A N/A N/A N/A piece set_axis cat_axis N/A N/A N/A N/A piece _get_axis cat_axis _to_safe_for_reshape N/A N/A piece N/A all_key N/A margin N/A key N/A N/A N/A table_pieces append piece N/A N/A N/A margin_keys append all_key N/A N/A margin grand_margin N/A cat_axis 0 N/A N/A key piece N/A N/A table groupby level 0 axis cat_axis N/A N/A all_key N/A _all_key key N/A N/A N/A table_pieces append piece N/A N/A N/A table_pieces append N/A Series N/A margin N/A key index N/A all_key N/A N/A N/A margin_keys append all_key N/A result N/A concat table_pieces axis cat_axis N/A N/A N/A len rows 0 N/A N/A result N/A N/A result table N/A margin_keys N/A table columns N/A N/A N/A len cols 0 N/A N/A row_margin N/A N/A N/A N/A N/A data N/A N/A cols values groupby cols agg aggfunc N/A row_margin N/A N/A row_margin stack N/A new_order N/A N/A N/A len cols N/A lrange N/A len cols N/A N/A row_margin index N/A N/A N/A row_margin index reorder_levels new_order N/A N/A row_margin N/A Series N/A np nan index N/A result columns N/A N/A result margin_keys row_margin N/A _generate_marginal_results_without_values N/A N/A table data rows cols aggfunc margins_name N/A All N/A N/A N/A N/A len cols 0 N/A N/A margin_keys N/A _all_key N/A N/A N/A N/A N/A N/A N/A len cols 1 N/A N/A margins_name N/A N/A N/A margins_name N/A N/A N/A N/A len cols 1 N/A N/A N/A N/A len rows 0 N/A N/A margin N/A N/A N/A N/A N/A data N/A rows groupby rows apply aggfunc N/A all_key N/A _all_key N/A N/A table N/A all_key margin N/A result table N/A N/A N/A margin_keys append all_key N/A N/A margin N/A N/A N/A N/A data groupby level 0 axis 0 apply aggfunc N/A all_key N/A _all_key N/A N/A table N/A all_key margin N/A result table N/A N/A N/A margin_keys append all_key N/A result N/A N/A result table N/A margin_keys N/A table columns N/A N/A len cols N/A N/A row_margin N/A N/A N/A N/A N/A data N/A cols groupby cols apply aggfunc N/A N/A row_margin N/A Series N/A np nan index N/A result columns N/A N/A result margin_keys row_margin N/A _convert_by N/A N/A by N/A N/A N/A N/A by None N/A N/A by N/A N/A N/A N/A N/A N/A lib isscalar by N/A isinstance by N/A N/A np ndarray Index Series Grouper N/A hasattr by __call__ N/A N/A by N/A by N/A N/A by N/A list by N/A by N/A crosstab N/A N/A index columns values rownames colnames aggfunc margins dropna normalize N/A None None None None False True False N/A N/A 
    Compute a simple cross-tabulation of two (or more) factors. By default
    computes a frequency table of the factors unless an array of values and an
    aggregation function are passed

    Parameters
    ----------
    index : array-like, Series, or list of arrays/Series
        Values to group by in the rows
    columns : array-like, Series, or list of arrays/Series
        Values to group by in the columns
    values : array-like, optional
        Array of values to aggregate according to the factors.
        Requires `aggfunc` be specified.
    aggfunc : function, optional
        If specified, requires `values` be specified as well
    rownames : sequence, default None
        If passed, must match number of row arrays passed
    colnames : sequence, default None
        If passed, must match number of column arrays passed
    margins : boolean, default False
        Add row/column margins (subtotals)
    dropna : boolean, default True
        Do not include columns whose entries are all NaN
    normalize : boolean, {'all', 'index', 'columns'}, or {0,1}, default False
        Normalize by dividing all values by the sum of values.

        - If passed 'all' or `True`, will normalize over all values.
        - If passed 'index' will normalize over each row.
        - If passed 'columns' will normalize over each column.
        - If margins is `True`, will also normalize margin values.

        .. versionadded:: 0.18.1


    Notes
    -----
    Any Series passed will have their name attributes used unless row or column
    names for the cross-tabulation are specified

    In the event that there aren't overlapping indexes an empty DataFrame will
    be returned.

    Examples
    --------
    >>> a
    array([foo, foo, foo, foo, bar, bar,
           bar, bar, foo, foo, foo], dtype=object)
    >>> b
    array([one, one, one, two, one, one,
           one, two, two, two, one], dtype=object)
    >>> c
    array([dull, dull, shiny, dull, dull, shiny,
           shiny, dull, shiny, shiny, shiny], dtype=object)

    >>> crosstab(a, [b, c], rownames=['a'], colnames=['b', 'c'])
    b    one          two
    c    dull  shiny  dull  shiny
    a
    bar  1     2      1     0
    foo  2     2      1     2

    Returns
    -------
    crosstab : DataFrame
     N/A index N/A N/A com _maybe_make_list index N/A columns N/A N/A com _maybe_make_list columns N/A rownames N/A _get_names index rownames prefix row N/A colnames N/A _get_names columns colnames prefix col N/A data N/A N/A N/A N/A data update N/A zip rownames index N/A N/A N/A data update N/A zip colnames columns N/A N/A N/A values None N/A aggfunc None N/A N/A N/A ValueError aggfunc cannot be used without values. N/A N/A N/A values None N/A aggfunc None N/A N/A N/A ValueError values cannot be used without an aggfunc. N/A N/A values None N/A N/A df N/A DataFrame data N/A N/A df N/A __dummy__ 0 N/A table N/A N/A df pivot_table __dummy__ index rownames columns colnames aggfunc len margins margins dropna dropna N/A table N/A N/A N/A N/A table fillna 0 astype N/A np int64 N/A N/A N/A data N/A __dummy__ values N/A df N/A DataFrame data N/A table N/A N/A df pivot_table __dummy__ index rownames columns colnames aggfunc aggfunc margins margins dropna dropna N/A N/A normalize False N/A N/A table N/A _normalize table normalize normalize margins margins N/A table N/A _normalize N/A N/A table normalize margins N/A N/A N/A N/A N/A N/A isinstance normalize bool N/A N/A isinstance normalize N/A compat string_types N/A N/A axis_subs N/A 0 1 index columns N/A N/A N/A normalize N/A axis_subs N/A normalize N/A N/A N/A KeyError N/A N/A N/A ValueError Not a valid normalize argument N/A N/A margins False N/A N/A normalizers N/A all columns index N/A N/A N/A x N/A N/A x N/A N/A N/A N/A x sum axis 1 sum axis 0 N/A N/A N/A x N/A N/A x N/A N/A x sum N/A N/A N/A x N/A N/A N/A x div N/A N/A x sum axis 1 axis 0 N/A N/A normalizers N/A True N/A normalizers N/A all N/A N/A N/A f N/A normalizers N/A normalize N/A N/A N/A KeyError N/A N/A N/A ValueError Not a valid normalize argument N/A table N/A f table N/A table N/A N/A table fillna 0 N/A N/A N/A margins True N/A N/A column_margin N/A N/A N/A N/A table loc N/A N/A N/A All drop All N/A index_margin N/A N/A N/A N/A table loc N/A N/A All N/A drop All N/A table N/A N/A N/A N/A table drop All axis 1 drop All N/A table N/A _normalize table normalize normalize margins False N/A N/A normalize columns N/A N/A column_margin N/A column_margin N/A N/A column_margin sum N/A table N/A concat N/A table column_margin axis 1 N/A table N/A N/A table fillna 0 N/A N/A N/A normalize index N/A N/A index_margin N/A index_margin N/A N/A index_margin sum N/A table N/A N/A table append index_margin N/A table N/A N/A table fillna 0 N/A N/A N/A N/A normalize all N/A normalize True N/A N/A column_margin N/A column_margin N/A N/A column_margin sum N/A index_margin N/A index_margin N/A N/A index_margin sum N/A N/A N/A index_margin loc N/A All 1 N/A table N/A concat N/A table column_margin axis 1 N/A table N/A N/A table append index_margin N/A table N/A N/A table fillna 0 N/A N/A N/A ValueError Not a valid normalize argument N/A N/A N/A ValueError Not a valid margins argument N/A table N/A _get_names N/A N/A arrs names prefix N/A row N/A N/A N/A names None N/A N/A names N/A N/A N/A i arr N/A enumerate arrs N/A N/A N/A N/A isinstance arr Series N/A N/A arr name None N/A N/A N/A N/A names append N/A arr name N/A N/A N/A N/A names append N/A %s_%d N/A prefix i N/A N/A N/A N/A len names N/A len arrs N/A N/A N/A AssertionError arrays and names must have the same length N/A N/A N/A isinstance names list N/A N/A names N/A list names N/A names N/A