You can replace this only for this column using replace :
df['workclass'].replace('?', np.NaN)
or for all df:
df.replace('?', np.NaN)
UPDATE
OK I understood your problem, by default, if you do not pass a separator character, then read_csv will use the comma ',' as the separator.
Your data and, in particular, one example where you have a problematic line:
54, ?, 180211, Some-college, 10, Married-civ-spouse, ?, Husband, Asian-Pac-Islander, Male, 0, 0, 60, South, >50K
it is actually a comma and space as a separator, so when you passed na_value=['?'] , it did not match, because all your values โโhave a whitespace character in front of you that you cannot observe.
if you change your line as follows:
rawfile = pd.read_csv(filename, header=None, names=DataLabels, sep=',\s', na_values=["?"])
then you should find that it all works:
27 54 NaN 180211 Some-college 10