Menu
Stuff by Yuki
  • Home
  • Python
  • Power BI
  • Tableau
  • Community
    • Makeover Monday
    • Workout Wednesday
  • About
  • Contact
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

Leave a Reply Cancel reply

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

Recent Posts

  • How To Create Views in BigQuery
  • How to Create a Hex Map in Power BI
  • Format All DAX Measures at Once
  • What are Power BI Dataflows?
  • Calculate the Max Sales Amount for Product

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)
  • Year-Over-Year Calculation: Time Intelligence in Power BI
  • Network Visualizations in Python

connect with me

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