There is an example of exercise in a book "Thermodynamics, An Engineering Approach, the 8th edition" by Yunus A. Cengel and Michael A. Boles (example 7-9) stating that:
Air is compressed from an initial state of $100$ kPa and $17^\circ C$ to a final state of $600$ kPa and $57^\circ C$. Determine the entropy change of air during this compression process by using (a) property values from the air table and (b) average specific heats.
The answer of point (b) is that the below equation is used: $$s_2 - s_1 = c_{p,avg} \ln\left(\frac{T_2}{T_1}\right)- R\ln\left(\frac{P_2}{P_1}\right)$$
where $c_{p,avg}$ is specific heat for constant pressure at average temperature average of $37^\circ C$.
Why is $c_{p,avg}$ used in this example even though it is obvious that there is pressure change during process?