arrays as in the tips datain [ ]pd crosstab([tips timetips day]tips smokermargins=trueout[ ]smoker no yes all time day dinner fri sat sun thur lunch fri thur all example federal election commission database the us federal election commission publishes data on contributions to political campaigns this includes contributor namesoccupation and employeraddressand contribution amount an interesting dataset is from the us presidential election (dataset for all states is megabyte csv file -all csvwhich can be loaded with pandas read_csvin [ ]fec pd read_csv('ch / -all csv'in [ ]fec out[ ]int index entries to data columnscmte_id non-null values cand_id non-null values cand_nm non-null values contbr_nm non-null values contbr_city non-null values contbr_st non-null values contbr_zip non-null values contbr_employer non-null values contbr_occupation non-null values contb_receipt_amt non-null values contb_receipt_dt non-null values receipt_desc non-null values memo_cd non-null values memo_text non-null values form_tp non-null values file_num non-null values dtypesfloat ( )int ( )object( sample record in the dataframe looks like thisin [ ]fec ix[ out[ ]cmte_id data aggregation and group operations www it-ebooks info