I am trying to filter the rows of a Dataframe depending if the value of a column is part of a series so:
pack_data_clean=pack_data_clean[pack_data_clean["actual_box_barcode"].isin(ref_list)==True] Where pack_data_clean is the dataframe to be filtered, actual_box_barcode the column to check and ref_list the series with the values that will remain in the dataframe.
However ref_list is not a regular series with values, but a series made of series, let's see:
ref_list=["BG1", "BG2", "BG3", "BG4", A1_refs, A2_refs, A3_refs, C1_refs, C2_refs, C3_refs, C4_refs, C5_refs , E0_refs, E1_refs, E3_refs, E4_refs, E6_refs, E7_refs, E36_refs] Where A1_refs e.g. is:
A1_refs=["EEC", "ENC", "EZC"] Right now my code is only filtering the rows that are "BG1", "BG2", "BG3", "BG4" but I would like to filter as well "EEC", "ENC", "EZC" and so on.
Could you please help me to ¡create this filter accordingly? Thanks, Eduardo