Leaving DCA, bound for IAH on UA700 on February 3. Boarding went smoothly, but there was clearly a bit of a delay. Got a text from UA that departure would be delayed until 12:20 (about 25 minutes late). Shortly thereafter, cabin crew announced that we'd be delayed due to a "crew issue;" that the pilot was on his way and would arrive in about 20 minutes. Crew said they would be all ready to go, and that as soon as the pilot was on board, we'd go. We had a pretty tight connection in Houston, as did lots of others, so we hoped we'd get out OK. Pilot arrived as expected, and we departed DCA. Shortly before takeoff, pilot came on the PA and said, "Sorry for the late takeoff, folks. I made a human error and showed up at the wrong airport. I'm really sorry, and we'll do our best to make up the lost time." I know as pax we always worry that we'll go to IAD instead of DCA; JFK instead of LGA, etc. I'm sure the pilot was really chagrined, and traffic was terrible in DC that morning due to rain, so it's good he made it back in from IAD. It was also really nice to have him be honest about what happened. Everyone did their best to get connecting pax off first, and it was a nice flight. I hope all the connectors made their flights.