

Discover more from Daily Dose of Data Science
High-quality insights on Data Science and Python, along with best practices — shared daily.
Get a free 550+ page data science PDF guide and 450+ practice questions notebook.
Over 50,000 subscribers
Continue reading
A Lesser-Known Feature of Apply Method In Pandas
After applying a method on a DataFrame, we often return multiple values as a tuple. This requires additional steps to project it back as separate columns.
Instead, with the result_type argument, you can control the shape and output type. As desired, the output can be either a DataFrame or a Series.
Share this post on LinkedIn: Post Link.
Find the code for my tips here: GitHub.
I like to explore, experiment and write about data science concepts and tools. You can read my articles on Medium. Also, you can connect with me on LinkedIn.