"To gerrymander the districts" means to manipulate or draw the boundaries of electoral districts in a way that favors a specific political party or group. It is done to gain an advantage in elections by dividing the voters in a strategic way.
Full definition