Description
A while ago, I got the review from @jreback that:
- Replace instances of pd. with direct imports (from review TST/CLN: series.duplicated; parametrisation; fix warning #21899 (comment)):
don’t import pd, directly import instead
- Replace direct use of
assert_..._equal
with thetm.assert_..._equal
(from review TST/CLN: series.duplicated; parametrisation; fix warning #21899 (comment)):use tm; don’t import assert_series_equal
I kept applying these rules until #22730, where @jreback then said:
Before we do any more of this
[quote of the above]
I would like a lint rule to see what is what (and basically list the offenders as exclusions for now).
We have been changing things like this for a long time and I think we somtimes change them back (e.g. to use the imports ofassert_*
, rather thantm.
, and to use thepd.*
rather than the direct imports.
and further:
let's see which way is more common, then have a lint rule to enforce it, rather than ad-hoc conversions (which has been the policy up till now).
Opening this issue for someone to write such a lint rule, because I wouldn't know where to start.