import pandas as pd
import numpy as np
df = pd.DataFrame(np.random.randint(-15, 15, size=[5,4]), columns=list("ABCD"))
print(df)
"""
Output
A B C D
0 8 2 3 7
1 8 0 -2 -11
2 13 -10 -10 -4
3 -9 -6 13 11
4 3 -6 4 13
"""
df1 = df.copy()
# Selecting rows which have postive value for Column A
df = df[df.A>0]
print(df)
"""
Output
A B C D
0 8 2 3 7
1 8 0 -2 -11
2 13 -10 -10 -4
4 3 -6 4 13
"""
# masking values with whcih are less than 2
df1 = df1[df1>2]
print(df1)
"""
A B C D
0 8.0 NaN 3.0 7.0
1 8.0 NaN NaN NaN
2 13.0 NaN NaN NaN
3 NaN NaN 13.0 11.0
4 3.0 NaN 4.0 13.0
"""