generate functionSat, 01 Apr 2023

giving the list "Indexes" =[0,10,15,18,16] and the dataframe "global_dataframe". Geta subDataFrame from "global_dataframe" containing only the information of indexes in "Indexes"

def get_subDF(global_dataframe, Indexes): sub_dataframe = global_dataframe.iloc[Indexes,:] return sub_dataframe

Want to kickstart your project?Use the new AI Studio to create your code