Skip to content

Instantly share code, notes, and snippets.

@ashutoshsahu2015
Created April 3, 2021 12:04
Show Gist options
  • Save ashutoshsahu2015/cd2279bead0fd746bb10bfc9a51f2e02 to your computer and use it in GitHub Desktop.
Save ashutoshsahu2015/cd2279bead0fd746bb10bfc9a51f2e02 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Replacing the outliers\n",
"Since the lower boundaries of Age and Fare column is negative value we do not need to consider the lower boundary because as per the domain knowledge there won't be any negative values exists for Age and Fare Column"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"dataset.loc[dataset['Age']>=73,'Age']=73\n",
"dataset.loc[dataset['Fare']>=100,'Fare']=100"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment