noekpg
Last Updated: February 25, 2016
·
913
· dionysios
083618effe3fca9cd4ecc895809833a8

Replacing Values in Data Frames

Data frames can be treated as vectors when it comes to replacing values. For example in a data frame that all the not available entries have been encoded as -1, we can change them to NA as follows:

dataFrame[dataFrame == -1] = NA

Say Thanks
Respond