Skip to content

Tag: pandas

Row wise operation in Pandas DataFrame

I have a Dataframe as I would like to have a lambda function in apply method to create a list of dictionary (including index item) as below If I use something like .apply(lambda x: <some operation>) here, x does not include the index rather the values. Cheers, DD Answer To expand Hans Bambel’s ans…