I was able to filter the data frame but could not get to generate columns with suffice the given condition in code.
My Trial:
import pandas as pd
from pandas import Timestamp
import re,datetime
df1 = pd.DataFrame({'A': {0: Timestamp('2021-02-13 00:00:00'), 1: Timestamp('2021-02-14 00:00:00'), 2: Timestamp('2021-02-15 00:00:00'), 3: Timestamp('2021-02-16 00:00:00'), 4: Timestamp('2021-02-17 00:00:00')}, 'B': {0: Timestamp('2021-02-13 00:00:00'), 1: Timestamp('2021-02-14 00:00:00'), 2: Timestamp('2021-02-13 00:00:00'), 3: Timestamp('2021-02-13 00:00:00'), 4: Timestamp('2021-02-13 00:00:00')}, 'C': {0: 'C0', 1: 'C1', 2: 'C2', 3: 'C3', 4: 'C4'}})
df2 = df1[(df1.A > df1.B)]
#df2["D"] = df1[(df1.A > df1.B)]
print (df2)
Expected Output: