fixed first/last in pandas