4 ms·
Long-time R user here. Yes, many of these points are valid but I still think R is unbeaten when it comes to speed in (tabular) data exploration. In the article
by beernet 5y ago
Long-time R user here. Yes, many of these points are valid but I still think R is unbeaten when it comes to speed in (tabular) data exploration. In the article you mention that you missed using data.table - a significant portion of the problems you named would be solved or at least weakened by using data.table. Started working with it many years ago and never looked back. It's easy, powerful and efficient to use. I also find its Python pendant, pandas, much less intuitive to use (.loc() anyone?) although they compare performance wise.
- tomrod 5y ago.loc works smashingly. %>%?
- curiousgal 5y agoWell thats the thing with pandas, which one is it? [], loc, iloc, . ? Why do I have to reset_index so often? I agree with OP R has Pandas beaten when it comes to accessing data.
- tomrod 5y agoiloc - numerical location, loc - location in table I rarely reset index -- perhaps its a difference in familiarity? (I use R but it isn't my background, perhaps there is a forced R pattern that is a general antipattern for indexes?)
- _dain_ 5y agoI will agree about [] being overloaded, but .loc and .iloc are distinct for a good reason. .loc is for operations according to the index, .iloc is for operations according to position. You have to reset_index() so often probably because you are not using the index properly. Effective use of Pandas means effective use and consideration of the indexes on your dataframes and series. Recommended watching (32:00 onwards): https://www.youtube.com/watch?v=mWtfZaT7iSc https://www.youtube.com/watch?v=mWtfZaT7iSc
- nojito 5y agoYou can and should use Data.table without pipes. You will be hard pressed to use pandas without .loc and resetting your index.
- _dain_ 5y ago>.loc() anyone? What is wrong with .loc, in your view? Genuine question. I used to dislike it but I've been using pandas for a while and I've gotten comfortable with it, and I've forgotten the reasons I used to dislike it.