Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Data Cleaning based on Data Analysis using Python & EDA
- # Removing the wage outlier row based on EDA observation
- crimeData = crimeData[crimeData.county != 185] # very high wser & prob of conviction
- crimeData = crimeData[crimeData.county != 115] # prob of arrest > 1
- # Removing rows with probability of arrest and conviction > 1
- crimeData = crimeData[crimeData['prbarr'] < 1]
- crimeData = crimeData[crimeData['prbconv'] < 1]
- # The location cannot be both west and central together.
- crimeData = crimeData[crimeData['west']+crimeData['central'] <= 1]
- # dropping the Year column as it doesn’t help in prediction
- crimeData = crimeData.drop('year', axis=1)
Add Comment
Please, Sign In to add comment