a code for an o2 sensor doesn't necesarily mean a bad o2. It means it has a lack of switching. So it is either rich to often or lean to often. You need to check and see which it is and adress a problem with how the engine is running. Could have a vacume leak which would be lean, bad injectors which could be either lean or rich, bad air flow meter which could be either, the list goes on and on. Good luck.