rdr-py / code / get_target.py
get_target.py
Raw
"""
*******************************************************
Owner: Ashutosh Jha
For: APPCAIR BITS Pilani Goa Campus, Reflexis Systems
Function Name: get_target
Takes column list as input. Asks user about target 
column and returns, if isn't present then returns none.
*******************************************************
"""
def get_target(col_list):
    t_input = None
    print("Kindly provide the Target Column name, if not available, press ENTER.")
    t_input = input()
    if (t_input not in col_list):
        print("Wrong column name. Does not exist. Assuming no target column.")
        t_input=None
    return t_input