Remove and discard any bruised or undesirable outside leaves from the head of cabbage. Quarter and core the cabbage and using a large chef's knife, or the shredding blade of a food processor, shred the cabbage. Grate the carrot and add it to the cabbage, tossing together to combine. Add the onion, pickles, mayonnaise, salt, and pepper. Stir together until thoroughly mixed. Chill for 1 hour before serving.