You can do it yourself, probably but why are you changing the sensor.
If you got a trouble code that points to the sensor, that doesn't necessarily mean the sensor is bad.
Most time it means you car needs a tune-up very badly, new spark plugs, spark plug wires, air filter.
This is because the ECM gets the reading from the sensor and the sensor is saying your exhaust stinks and the reading it's getting is not what it's supposed to get.
The reading from the sensor could be correct and the sensor might be working correctly.