Module Import alias identifier ImportFrom alias alias Assign NameStore Call NameLoad ListLoad Dict Str Str Str Str Num Str Str Num Dict Str Str Str Str Num Str Str Num Dict Str Str Str Str Num Str Str Num Dict Str Str Str Str Num Str Str Num Dict Str Str Str Str Num Str Str Num Dict Str Str Str Str Num Str Str Num Expr NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr keyword Str keyword ListLoad Str Str Index Str Expr NameLoad Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword Num Expr TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad Call NameLoad NameLoad Call NameLoad NameLoad keyword ListLoad Str Str Expr NameLoad Expr AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr Expr Call AttributeLoad AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr attr Num Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str attr Lambda arguments args NameParam defaults Call AttributeLoad Call AttributeLoad NameLoad attr ListLoad Str Str attr Str Expr Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr Str attr Lambda arguments args NameParam defaults Call AttributeLoad Call AttributeLoad NameLoad attr ListLoad Str Str attr Str attr
N/A N/A pandas pd pandas DataFrame Series N/A df N/A DataFrame N/A N/A year name sex births 1880 John M 13 N/A year name sex births 1880 Pat M 13 N/A year name sex births 1880 Pat F 13 N/A year name sex births 1880 Jane F 20 N/A year name sex births 1881 John M 90 N/A year name sex births 1881 Jane F 21 N/A df N/A pt N/A N/A N/A df pivot_table rows year cols N/A name sex N/A births N/A pt N/A names N/A set N/A N/A N/A pt columns get_level_values level 0 N/A sexes N/A set N/A N/A N/A pt columns get_level_values level 1 N/A N/A names sexes N/A new_index N/A N/A N/A pd MultiIndex from_product N/A N/A list names N/A list sexes names N/A name sex N/A new_index N/A N/A N/A N/A N/A pt T reindex new_index T N/A N/A N/A N/A N/A N/A N/A pt T reindex new_index T fillna 0 N/A N/A N/A N/A N/A df groupby year apply N/A N/A N/A s N/A N/A N/A N/A N/A s groupby N/A name sex agg sum N/A N/A N/A N/A N/A N/A N/A df groupby year apply N/A N/A N/A s N/A N/A N/A N/A N/A s groupby N/A name sex agg sum unstack