-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
REF/CLN: test_get_dummies #33184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REF/CLN: test_get_dummies #33184
Conversation
lgtm. merge on green. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, one small comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an ongoing effort to replace pd.DataFrame
by DataFrame
in our code and to be redundant with the test method names (TestGetDummmies.test_basic
by TestGetDummmies.test_get_dummies_basic
)?
Replacing loops by parametrization improves readability, but these other changes look very personal and opinionated, and if we want to make them a standard, would be nice to have an issue referenced here. Otherwise we can end up in a situation where every time someone works with a file, we'll get some pd.
added and removed (for example, I would personally prefer to always have the module name and not import objects).
In this case it is redundant, but in many other cases we'll see something like
Not that I'm aware of. For files testing lower-level code, I like to have all the relevant imports at the top so that it is easy to tell what is tested in this file. If |
updated with typo fixup + green |
Yea @jorisvandenbossche and I agree, but at the same time I think someone needs to champion that cause if we want to establish a standard |
Thanks @jbrockmendel |
i have always been in favor of this :) moving to this will require a good code check though - s may need be that easy |
IMO this doesn't necessarily require a code check initially. |
I care most about consistency in a single file meaning we shouldn’t mix ways of referencing common things like Series vs pd.Series I do prefer using import of Series and not pd.Series |
I am confused now. I interpreted the above "i have always been in favor of this" as the opposite (#33184 (comment)), since that is replying to a quote of Will that is basically saying that he, Marc and I prefer to not import objects but modules (so using |
I opened a separate issue about it: #33203. Let's try to decide there which of the two ways has our preference. |
No description provided.