Wilmer Difo hit a triple and drove in three runs as the Pittsburgh Pirates beat the Chicago Cubs 6-5 in their series finale.