4 ms·
This is a repost from two days ago. why? I commented a bit late on the earlier one so I’ll repeat myself here. These comparisons feel like they are geared to
by mint2 3y ago
This is a repost from two days ago. why?
I commented a bit late on the earlier one so I’ll repeat myself here.
These comparisons feel like they are geared to analysts, not programming oriented data scientists. Which is fine, I suppose.
——- prior comment ——-
This is fine and all, (although I’m not impressed by the quality of the python code), but the examples don’t show how to do meta programming.
I often dont want to manually write out column names, but programmatically specify them, and similar for a lot of other of these examples. I don’t want to manually configure them.
I haven’t seen examples of that higher level programming in these various R python comparisons. It’s always manual examples.
The examples usually feel like manual analyst query type tasks. The tone in this one strongly reinforces that with text like “oh and Maria asked me to xyz”
- rrr_oh_man 3y ago> The examples usually feel like manual analyst query type tasks. The tone in this one strongly reinforces that with text like “oh and Maria asked me to xyz” That is 80% of lowly data analyst work in a corp.
- PartiallyTyped 3y agoPerhaps mods decided to bump this again. It happens.
- proamdev123 3y agoCan you give an example of what you mean by “meta programming” and “manual” in this context? I use pandas regularly, but I’m not sure exactly what you mean here. I’m wondering if you’re referring to some techniques I’m not aware of that could be useful.
- mint2 3y agoWell does the R df$colname behave like panda df.colname or is it like df[“colname”] which opens up a whole new layer where it can be df[var]? And there’s a ton of helpful things like dict unpacking of named aggs for groups bys. The dictionary can be the result of code or it can be spelled out. Also, a side note, both pandas and R make it easy to chain or pipe a long series of ops. I try to keep the number down though. In other languages this can be frowned on as a hard to debug train wreck pattern, esp if it grows to long. Usually I define filters and functions outside the train and pass them in rather inline the filters or lambdas as they’re so much easier to debug that way.
- proamdev123 3y agoYou can also debug by putting each method on a separate line, which allows for debugging by commenting out individual methods one at a time. It enhances readability too. Example: (df.method1() .method2() .method3() )
- proamdev123 3y agoThe code didn’t render properly, and it’s not letting me edit the comment. Here’s my example: (df.method1() .method2() .method3() )