0 votes
I want to find and replace outliers - values greater than (mean+/-2 STd) with mean. What logic should I use for this?
Jul 16, 2019 in Python 2,032 views

## 1 answer to this question.

0 votes
There are various ways we can replace the outliers it depends on the type of data you have, suppose you have some data with one of the columns has values 1,2,3,6,3,2,4,987 Now if you see most of the values are very much close to each other but there is one value which is too large in this case we use standard scaler or min-max scaler to normalize it since for this column range is very high, you can also replace the outliers by applying a condition if value is greater than the mean value of the column then replace it by mean value but standard scaler recommend when your data size is very big,
answered Jul 16, 2019 by Dinesh

–1 vote
2 answers

## How to filter out any digit that contains odd number in a range of number in Python?

n = list(range(10)) b = list(filter(lambda i:i%2!=0,n)) print(b) READ MORE

0 votes
1 answer

## How to find if a value exists in Pandas dataframe?

Try this:​ for name in df['Name']: ...READ MORE

0 votes
1 answer

## How to find the index of a particular value in a dataframe?

First, use the dataframe to match the ...READ MORE

0 votes
1 answer

## How to display rows of one dataframe in a concatenated dataframe?

You can do this only if you ...READ MORE

0 votes
2 answers

## how can i randomly select items from a list?

You can also use the random library's ...READ MORE

+1 vote
2 answers

## how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

0 votes
1 answer

## how do i use the enumerate function inside a list?

Enumerate() method adds a counter to an ...READ MORE

+5 votes
6 answers

## Lowercase in Python

You can simply the built-in function in ...READ MORE

0 votes
1 answer

## How to eliminate out outliers in a dataframe?

There are various ways we can replace ...READ MORE

0 votes
1 answer

## How to convert a Pandas GroupBy object to DataFrame in Python

g1 here is a DataFrame. It has a hierarchical index, ...READ MORE