I second the answer provided by @Papyrus above. Also, I have frequently run into this issue when reading external data in to R. If you want the first column of the table to be the row names of the data frame in R, you can set the row.names parameter to 1 when reading in the data. Hope you find this helpful!
You asked for rownames, R gave you numbers. Those are your rownames, not the contents of X. Usually, when you import into R, your rowname column should not have a column name too.
As mentioned already, you can specify row.names when importing the file, or you can always assign new rownames within R. Or, if you want the gene names, just get the contents of the column you want, row name or not.