1

My problem is similar to this one but instead of udf I need to use pandas_udf.

I have a spark data frame with many columns (number of columns varies) and I need to apply on them a custom function (for example sum). I know I can hard-code column names but it does not work when the number of columns varies.

Please see examples:

enter image description here

Alexandre B.
  • 5,092
  • 2
  • 14
  • 38
Grzegorz
  • 833
  • 8
  • 8

0 Answers0