Hard start due to bad O2 sensor?

If you can fix the problem first, you can change the O2 sensor later. You may have to try changing the ignition switch first, seeing as no mechanic can do better at finding the problem. Somebody should read the codes.