Returning Two Column Values from Pandas Apply

This code snippet shows you how you can return two values from pandas apply function and assign to two new columns.

There are two methods:

  • Use result_type expand
  • Use Series

--

--

AI/Data Science Digest

One Digest At a Time. I value your time! #datascience #AI #GenAI #LLMs #dataanalyst #datascientist #probability #statistics #ML #savetime #digest