I'd like to figure out how I can create a column in my dataframe based on a multiple check condition.
When I use a single conditional check this seems to work fine.
df['1/1/2017'] = np.where(df["Term 1 Start Date"] <= '1/1/2017'), 'True', 'False')
However when I introduce a second option to check upon this fails telling me that ValueError: The truth value of a Series is ambiguous.
df['1/1/2017'] = np.where(
(df["Term 1 Start Date"] <= '1/1/2017' and df["Term 1 End Date"] > '1/1/2017'), 'True', 'False')
It should be noted that not all lines are filled in. The dates contain dates as you would expect. What can I do to have this new column populate based on two criteria?
current dataframe
Desired result
Term 1 Start Date | 1/1/2017
blank | blank
6/12/2016 | True
5/1/2016 | True
2/1/2017 | False
4/1/2017 | False