|
|
|
|
|
by rathleon
1324 days ago
|
|
The problem with this snippet isn't really the chaining; it's all the inlining. All the lists, and the many lambdas used, could be variables. Does this approach make it "professional code"? The responses seem out of context, too: >David: What's the elevator pitch for writing pandas code the way that you do? >Matt: One common thing that you'll see in the data science world is this notion that there's like Untitled1.ipynb and Untitled2.ipynb[...]. My goal is to help with that so (...) you have Analysis_for_ClientA.ipynb and that's the only notebook you have. And you can come back to it tomorrow and pick it up where you left off and you're going to be productive. Your code will be easier to read[...]. This is a tweet. Filenames aren't even argued. This doesn't answer the interviewer's question either. Writing code != naming files. >David: What is it that separates beginner pandas code from professional pandas code? >Matt: I would say that if you want to write good pandas code (...) you should know how to write lambdas. You should know how to do list and dictionary comprehensions. Dictionary unpacking (...) is super useful in pandas world. Absolutely. But professionals use variables, too. Possibly even more so. |
|