Let's consider following data frame:
I want to change string-type elements of this DataFrame into NaN. Example of an solution would be:
frame.replace("k", np.NaN)
frame.replace("s", np.NaN)
However it would be very problematic in bigger data sets to go through each element, checking if this element is string and changing it at the end. Is there an easier solution?
Desired table:

