Pandas Boolean Filter with Assignment resulting in NaN
Advertisements I’m curious why this toy example for simultaneous boolean index + assignment in Pandas doesn’t work: df = pd.DataFrame({‘Source’: [‘A’, ‘B’, ‘C’, ‘A’, ‘B’, ‘C’], ‘Period’: [‘1 hr’, ‘1 hr’, ‘1 hr’, ’24 hr’, ’24 hr’, ’24 hr’], ‘CO’: [1.1, 1.2, 1.3, 2.1, 2.2, 2.3], ‘DPM’: [11.1, 11.2, 11.3, 12.1, 12.2, 12.3], ‘NOx’: [21.1,… Read More Pandas Boolean Filter with Assignment resulting in NaN