Using an imported CSV file, I indexed the DataFrame like this...
rdata.set_index(['race_date', 'track_code', 'race_number', 'horse_name']) This is what a section of the DataFrame looks like...
race_date track_code race_number horse_name work_date work_track 2007-08-24 BM 8 Count Me Twice 2007-05-31 PLN Count Me Twice 2007-06-09 PLN Count Me Twice 2007-06-16 PLN Count Me Twice 2007-06-23 PLN Count Me Twice 2007-08-05 PLN Judge's Choice 2007-06-07 BM Judge's Choice 2007-06-14 BM Judge's Choice 2007-07-08 BM Judge's Choice 2007-08-18 BM Why isn't the 'horse_name' column being grouped like the date, track and race? Perhaps it's by design, thus how can I slice this larger DataFrame by race to have a new DataFrame with 'horse_name' as its index?