databricks / koalas

Koalas: pandas API on Apache Spark
Apache License 2.0
3.32k stars 356 forks source link

lambda row scrambles results without index #2164

Open oinbar opened 3 years ago

oinbar commented 3 years ago

running

df[new_col] = df.apply(lambda row: func(row) where func depends on logic between other columns returns scrambled results in new_col, unless you hit df.reset_index() first. Same code works as expected in pandas.

itholic commented 2 years ago

Could you show me the code example if possible so that I can reproduce and investigate ??