Generation

generate functionFri, 03 Feb 2023

generate a unique id for each line of the pandas dataframe

def unique_id(df): return [df['line_id'][i] for i in range(df.shape[0])] unique_id(df)

Questions about programming?Chat with your personal AI assistant