Female patients undergoing anti-PD-1/PD-L1 therapy for non-small cell lung cancer (NSCLC) and esophageal cancer tended to have longer overall survival (OS) than males. Here, CD274 is linked to non-small cell lung carcinoma.