I am new to pandas so can someone please give me an insight into the following:
I would like to drop some outliers and the following code does not work:
train = train.drop(['GrLivArea']>4000) & (['SalePrice']<300000)
when i try: train = train.drop(train[(train['GrLivArea']>4000) & (train['SalePrice']<300000)].index)
, it works.
Can someone please explain why I need to state 'train' two times before the column name (GrLivArea) when I indicated the dataframe I am referring to (by stating train.drop)
thanks alot.