dataframe list of list words code example
Example 1: comprehension list iloc pandas
df['Flag2'] = ["Increase" if x > y else "Decrease" for (x,y) in zip(df['nextsalary'],df['prevsalary'])]
Example 2: comprehension list iloc pandas
df['col2'] = [int(x) for x in df['col1']]