generate functionSat, 01 Apr 2023

dataframe "global_dataframe". Read information "Indexes" in the dataframe "IDDF" for the index [0] in the columns "Id1", "Id2", "Id3", etc. with 12 columns. Geta subDataFrame from "global_dataframe" containing only the information of indexes in "Indexes"

def get_df(global_dataframe, IDDF): Indexes = [] for i in range(0,12): Indexes.append(IDDF.iloc[0,i]) subDF = global_dataframe.loc[Indexes] return subDF

Questions about programming?Chat with your personal AI assistant