You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generally, a function should not return different types of things depending on a argument passed to it. Instead, it's generally preferable to split it into 2 functions. Matplotlib violates this a lot and returns different things based on the input and it's annoying af.
If we need __call__ to return the combinations, I'd suggest we only return that and have a different method e.g. get_data_frame that returns a data frame when called. Although I'm not sure we should use pandas so much in the codebase because there are downsides to making that a dependency of the framework.
Generally, a function should not return different types of things depending on a argument passed to it. Instead, it's generally preferable to split it into 2 functions. Matplotlib violates this a lot and returns different things based on the input and it's annoying af.
If we need
__call__
to return the combinations, I'd suggest we only return that and have a different method e.g.get_data_frame
that returns a data frame when called. Although I'm not sure we should use pandas so much in the codebase because there are downsides to making that a dependency of the framework.Originally posted by @matham in #1 (comment)
The text was updated successfully, but these errors were encountered: