4 ms·
Pandas has use cases, but i see it sooo much overused for no reason. People automatically think "csv? I gotta install Pandas!" even if CSV is like 20 lines lon
by dgan 3y ago
Pandas has use cases, but i see it sooo much overused for no reason.
People automatically think "csv? I gotta install Pandas!" even if CSV is like 20 lines long. Then follows 15 lines of Pandas DSL that i have to decipher to modify anything
I hate it
- klysm 3y agoOn the other hand, if I need to parse a CSV with python, why not load pandas if you can bang it out super quickly?
- aidos 3y agoAn aversion to using something beyond the stdlib for no good reason probably. Personally I've seen people reach for pandas only to accidentally coerce data in non-obvious ways. Clearly it depends on what you're planning on doing with the data afterwards though. import csv with open(filename, 'r') as f: r = csv.reader(f) for row in r: tsc, _, pc, *_ = row print(int(tsc, 16), int(pc, 16))
- dwrodri 3y agoI'm waking a bit of a zombie thread because unfortunately I had to step away when this was re-uploaded, but I have to resoundingly agree with you. The overuse of pandas is quite painful. For what it's worth, here's my defense: The data in this neat CSV actually came from simulations that were dumping Parquet files on the order of 100s of GiBs, which was the reason I was using pandas in the first place. This code snippet was lifted from a processing pipeline where pandas was used for other reasons, but I admit, it probably would have been best to break it out into its own little file and not include the module at all.