Timeline for answer to Using replace efficiently in pandas by Nolan Conaway
Current License: CC BY-SA 4.0
Post Revisions
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 7, 2023 at 3:16 | comment | added | Mike | In my case, apply_series_replace() is by far the fastest (5ms vs 36s with .replace()). I'm replacing in a column with 30k rows and a map with 42k entries. Thanks Nolan. | |
| Apr 21, 2022 at 11:53 | comment | added | Targaryel | In my case, and with a dict/mapper with more items to substitute, the apply_series_replace function is faster (~3x speedup with the dataframe I'm using, 2006 rows and 3044 cols). | |
| Feb 3, 2021 at 9:32 | comment | added | Daves | brilliant, for some reason, your numpy_series_replace is faster than the pd.map function | |
| Nov 18, 2020 at 22:12 | history | edited | Nolan Conaway | CC BY-SA 4.0 |
added 24 characters in body
|
| Nov 18, 2020 at 21:55 | history | answered | Nolan Conaway | CC BY-SA 4.0 |