human
I am working on the file "2018/data_wrangling/Create Boulders Final.ipynb".
The first task is:
<br>
Add column MainHoldTypes
Can you write Python program for it?

Give me a the Python program you requested?
assistant
#Here is the Python program you requested.

def add_column_main_hold_types(column_name="MainHoldTypes"):
    def set_main_hold_types(row):
        boulder_name = row.name
        main_hold_types1_s = spb2018_df.loc[(spb2018_df["Boulderin nimi"] == boulder_name), "Boulderin pääotetyypit"]
        main_hold_types2_s = spb2018_df.loc[(spb2018_df["Boulderin nimi.1"] == boulder_name), "Boulderin pääotetyypit.1"]
        main_hold_types3_s = spb2018_df.loc[(spb2018_df["Boulderin nimi.2"] == boulder_name), "Boulderin pääotetyypit.2"]
        main_hold_types_s = main_hold_types1_s.append(main_hold_types2_s).append(main_hold_types3_s)
        main_hold_types = ",".join(main_hold_types_s)
        # Clean main_hold_types
        main_hold_types = ",".join(sorted(list(set([main_hold_type.strip().lower() for main_hold_type in main_hold_types.split(",")]))))
        return main_hold_types
    
    boulder_details_df[column_name] = boulder_details_df.apply(set_main_hold_types, axis=1)
    
add_column_main_hold_types()
boulder_details_df.head()