-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Open
Labels
Code StyleCode style, linting, code_checksCode style, linting, code_checksNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further actionTestingpandas testing functions or related to the test suitepandas testing functions or related to the test suite
Description
So this discussion regularly comes up (latest one being #33184), so let's try to decide which one of the two we prefer.
In test code, do we do:
from pandas import Series
...
Series(...)
or
import pandas as pd
...
pd.Series(..)
Personally, I prefer the second, and from recent discussions I have the impression @WillAyd and @datapythonista do as well (is that correct?)
To be clear: consistency within a single file is most important (so not mixing Series and pd.Series in a single file).
But when someone does a PR to fix such inconsistencies in a file, it would be good if there is agreement on whether such a PR should replace pd.Series
with Series
or rather replace Series
with pd.Series
.
Metadata
Metadata
Assignees
Labels
Code StyleCode style, linting, code_checksCode style, linting, code_checksNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further actionTestingpandas testing functions or related to the test suitepandas testing functions or related to the test suite