Los Angeles Dodgers shortstop Hanley Ramirez left Thursday night's game against the San Francisco Giants with what the team described as a mildly strained left hamstring.