In 1899, Ransdell was elected as a Democrat to the Fifty-sixth Congress to fill the vacancy created by the death of Samuel Thomas Baird. He won his first full term in Congress in 1900, having defeated the Republican businessman Henry E. Hardtner of Urania in La Salle Parish, 6,172 votes (90.8 percent) to 628 (9.2 percent). Hardtner was the last Republican to contest the seat until 1976, when Frank Spooner of Monroe waged a strong but losing challenge to the Democrat Jerry Huckaby of Ringgold in Bienville Parish. By 1910, Hardtner had switched to Democratic affiliation and served for two years in the Louisiana House of Representatives as the first member ever from La Salle Parish. From 1924 to 1928, Hardtner was a state senator.