我要计算列值。以下是实际结果和预期结果: 实际:
State Event
IL no event
IL rain
IL rain
IL snow
IL no event
IL cloud
NC no event
NC rain
NC rain
NC rain
NC cloud
NC cloud
NC snow
NC no event
NC rain
NC cloud
我需要为每个州计算每个事件。
预期:
State Event Count
IL no event 2
IL rain 2
IL snow 1
IL cloud 1
NC no event 2
NC rain 4
NC snow 1
NC cloud 3