Data Cleaning for Riddler Wars
Looks like there are some invalid rows in the data -
https://github.com/fivethirtyeight/data/blob/master/riddler-castles/castle-solutions-3.csv#L238 https://github.com/fivethirtyeight/data/blob/master/riddler-castles/castle-solutions-3.csv#L818 https://github.com/fivethirtyeight/data/blob/master/riddler-castles/castle-solutions-3.csv#L1030
https://github.com/fivethirtyeight/data/blob/master/riddler-castles/castle-solutions-4.csv#L182 https://github.com/fivethirtyeight/data/blob/master/riddler-castles/castle-solutions-4.csv#L278 (O instead of 0) https://github.com/fivethirtyeight/data/blob/master/riddler-castles/castle-solutions-4.csv#L498 https://github.com/fivethirtyeight/data/blob/master/riddler-castles/castle-solutions-4.csv#L853
There's also invalid rows because the number of soldiers does not add up to 100, here are my numbers - 38 invalid rows from first war. 30 invalid rows from second war. 142 invalid rows from third war. 72 invalid rows from fourth war.