Is Data from Star Trek able to swim?
According to this conversation between Data and LaForge -- from the TNG episode, "Descent, Part II" -- no, he can't.
LAFORGE: You know, Data, I've been thinking about some of the times we've had. Like that time we went sailing on Devala Lake. You remember that?
DATA: I have a complete memory record of that day.
LAFORGE: You decided to go swimming, and when you jumped out of the boat you sank straight to the bottom.
DATA: I did not have enough buoyancy to get back to the surface.
LAFORGE: You had to walk over a kilometre along the bottom to get back to shore.
DATA: One kilometre forty six metres.
LAFORGE: It took almost two weeks to get the water out of your servos.
Star Trek: The Next Generation - S07E01 - "Descent, Part II"
This was contradicted by a scene from Star Trek: Insurrection, though, where it was shown that he had a built-in floatation device. Presumably, he can swim while utilising that feature, but likely not without doing so.
DATA: In the event of a water landing, I have been designed to serve as a floatation device.
Star Trek: Insurrection (1998)
In the TNG Novel Metamorphosis, Data becomes (temporarily) human and does indeed learn how to swim, a requirement for all humanoid Starfleet officers.
"You'll see," she said. "May I show you some strokes?"
Data suddenly remembered Geordi, but his friend had made a strategic retreat and was now sitting on one of the lounges at the edge of the pool, talking to Riker. So Data accepted Pris's offer. She taught him only one stroke, something called a crawl even though it was one of the most efficient swimming strokes humans could use.
After a great deal of splashing and sinking, he finally got his arms, legs, and head working together, and he and Pris swam side by side for a time.