2 ms·
Why do you not like so many parameters? They are optional so typically pandas only has one or two required parameters.
by prepend 7y ago
Why do you not like so many parameters? They are optional so typically pandas only has one or two required parameters.
- jonnycomputer 7y agoCallables requiring many parameters is often indicative that the code is doing too much, perhaps as coder after coder tweaked it to handle their particular use-case. I am not a big fan of (the over-use of) optional arguments either: I prefer code I'm reading to be more explicit, which is more pythonic imo.
- cometsong 7y agoI agree on over-use of optionals. I disagree with the code is thus doing too much, however. At least in this specific and some other cases, the method shown there is a wrapper to do a major task of converting data formats from one form to another. These optional, well-documented arguments show the defaults used, and are modifiable in, as you said, specific use-cases.