# https://github.com/SamLau95/pandas_tutor/issues/32
# https://pandas.pydata.org/pandas-docs/stable/user_guide/10min.html
import numpy as np
import pandas as pd

dates = pd.date_range("20130101", periods=6)
data = np.array([[ 1.14, -1.23,  0.4 , -0.68],
       [-0.87, -0.58, -0.31,  0.06],
       [-1.17,  0.9 ,  0.47, -1.54],
       [ 1.49,  1.9 ,  1.18, -0.18],
       [-1.07,  1.05, -0.4 ,  1.22],
       [ 0.21,  0.98,  0.36,  0.71]])
df = pd.DataFrame(data, index=dates, columns=list("ABCD"))
df2 = df.copy()
df2["E"] = ["one", "one", "two", "three", "four", "three"]

df2[df2["E"].isin(["two", "four"])] # <-- is this an example of a nested expression?
