4 ms·
There's too many ways of doing the same thing (which I assume is already itself a relic of maintaining back-compatibility), there's inconsistencies within the A
by agolio 4y ago
There's too many ways of doing the same thing (which I assume is already itself a relic of maintaining back-compatibility), there's inconsistencies within the API, there's "deprecated" stuff which isn't really deprecated, et cetera
dataframe.column
vs
dataframe['column']
as one example comes to mind but there is surely much more
I am of the philosophy of 'The Zen of Python'
There should be one-- and preferably only one --obvious way to do it.
Pandas is a powerful library, but when I have to use it in a workplace it usually gives me a feeling of dread, knowing I am soon to face various hacks and dataframes full of NaNs without them being handled properly, etc.
- 0cf8612b2e1e 4y agoWhich column format would you prefer? You need the latter to address random loaded data which may contain illegal identifiers. You need the former to stifle the rumblings about Pandas verbosity. I would get rid of the .column accessor, but you will see a lot of pushback. Notably from the R camp.
- agolio 4y agoI would also get rid of the .column accessor, it has the potential to collide with function members of the DataFrame so shouldn't have been added in the first place IMO
- naijaboiler 4y agoUm nah. I can't imagine R follow being against .column disappearing forever. There's no equivalent in R
- 0cf8612b2e1e 4y agoI mean that R users would insist it remains. The R $ accessor is terse and enables fast ad hoc analyses.
- naijaboiler 4y ago$ accessor does not exactly function like .column accessor. In fact, I think [''] accessor functions more like $ does.