Q:

Create a new column based on date time and today's date in pandas

I have a dataframe as shown below 
ID      Start_Date
1       2018-07-23
2       2019-07-14
3       2020-07-23
4       2018-07-20
5       2020-02-23
6       2018-07-23

From the above, I would like to flag False if start_Date is after today's date. 
Expected Output:
ID      Start_Date       Start_Date_Flag
1       2018-07-23       True
2       2019-07-14       True
3       2020-07-23       False
4       2018-07-20       True
5       2020-02-23       False
6       2018-07-23       True

A:

Use mask by Series.lt with today datetime:
df['Start_Date'] = pd.to_datetime(df['Start_Date'])

df['Start_Date_Flag'] = df['Start_Date'].lt(pd.to_datetime('now'))
print (df)
   ID Start_Date  Start_Date_Flag
0   1 2018-07-23             True
1   2 2019-07-14             True
2   3 2020-07-23            False
3   4 2018-07-20             True
4   5 2020-02-23            False
5   6 2018-07-23             True

