Pancreatic ductal adenocarcinoma (PDAC) is severely affecting the health and lives of patients. Clarifying the composition and regulatory factors of tumor immune microenvironment (TIME) is helpful for the treatment of PDAC. We analyzed the unique TIMEs and gene expression patterns between PDAC and adjacent normal tissue (ANT) using Gene Expression Omnibus (GEO) to find new immunotherapy targets. The Cancer Genome Atlas (TCGA) datasets were used to elucidate the possible mechanism of which tumor-associated macrophages (TAMs) changed in PDAC. We found that the composition of TAMs subtypes, including M0, M1, and M2, was different between PDAC and ANT, which was validated in recently published single-cell RNA-seq data. Many immune cells interacted with each other to affect the TIME. There were many DEGs enriched in some pathways that could potentially change the immune cell composition. KRT6A was found to be a DEG between PDAC and ANT that overlapped with DEGs between the M0-high group and the M0-low group in TCGA datasets, and it might alter and regulate TAMs via a collection of genes including COL5A2, COL1A2, MIR3606, SPARC, and COL6A3. TAMs, which could be a target of immunotherapy, might be influenced by genes through KRT6A and indicate an undesirable prognosis in PDAC.