In [1]:
import numpy as np
import pandas as pd
from pandas import Series,DataFrame
In [2]:
np.random.seed(12345)
In [5]:
df = DataFrame(np.random.randn(1000,4))
df.head()
Out[5]:
In [6]:
df.tail()
Out[6]:
In [7]:
df.describe()
Out[7]:
In [10]:
col1 = df[0]
In [12]:
col1.head()
Out[12]:
In [14]:
col1[np.abs(col1)>3]
Out[14]:
In [15]:
df[(np.abs(df)>3).any(1)]
Out[15]:
In [18]:
df[np.abs(df)>3] = np.sign(df) * 3
In [19]:
df.describe()
Out[19]:
In [ ]:
In [ ]: