The ideal gas law is presented by the equation PV = nRT. n, the number of moles, is equal to mass over molar mass. And density is M/V.
PV = nRT
PV = (M/molar mass)RT
P/RT = (1/molar mass)(M/V)
M/V = D = (molar mass)(P/RT)
Molar mass of CO2 = 44 g/mol
D = (molar mass)(P/RT)
D = (44 g/mol)(1 atm)/(0.08206 L-atm/mol-K)(273K)
D = 1.964 g/L