Menu
Stuff by Yuki
  • Home
  • Python
  • Power BI
  • Tableau
  • Community
    • Makeover Monday
    • Workout Wednesday
  • About
Stuff by Yuki

Python Pandas .apply() function – how does it differ from .applymap() and .map()?

Posted on November 18, 2021November 19, 2021

Pandas has a few functions that work very similarly, which are .apply(), .applymap(), and .map().

Here is a simple explanation:

.map() and .applymap() are similar to .apply(), but .map() only works on Series and .applymap() only works on Dataframes. So I’d usually go ahead and use .apply() than these other two functions

I used .apply() for this small project as part of the on-going community project Prepping data.

I’d probably prefer using .apply() in most cases since it covers both Series and Dataframes.

Anyways, this was just a little introduction to .apply(), .applymap(), and .map() 🙂 Hope this helps!

Source code in my Github repo

Post Views: 16

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Popular Posts

  • A Running Total Calculation with Quick Measure in Power BI
  • How To Copy And Paste Report Page in Power BI
  • How to Fill Dates Between Start Date and End Date in Power BI (Power Query)
  • How to Create an Information Panel in Power BI
  • My Experience Passing DA-100 Exam – Microsoft Certified: Data Analyst Associate

Recent Posts

  • How I Passed AWS Certified Developer Exam (DVA-C01)
  • Network Visualizations in Python – Introduction to NetworkX and Pyvis
  • DAX.do is a sandbox for DAX
  • Python Pandas .apply() function – how does it differ from .applymap() and .map()?
  • How To Copy And Paste Report Page in Power BI

connect with me

  • LinkedIn
  • Twitter
  • Github
©2022 Stuff by Yuki | Powered by SuperbThemes & WordPress