|
|
|
|
|
by sgarland
42 days ago
|
|
> the fact that programs and websites are delivered by large teams, there are dozens of submodules that are often loaded even when not needed Precisely this. We had an incident once where a CSV had a postal code field be interpreted as an integer by pandas, which of course results in stripping any leading 0s. After looking at what the code needed to do, I asked why they were using pandas in the first place, as it was literally just “read the CSV as-is into a list.” Guess what Python’s stdlib csv module doesn't do? Type inference. Instead of replacing the unnecessary pandas import (which brings along a fairly heavy transitive chain) with stdlib, they added additional code and tests to ensure this wouldn’t happen going forward. Some devs learn by trying. Others learn by reading docs. Most seem to learn by reading blog posts that use unnecessary 3rd party packages. |
|
If there are no guardrails, loose quality control and nobody cares about performance - why should they replace current pandas with stdlib?