Ref: https://github.com/pandas-dev/pandas/pull/46487#pullrequestreview-1059398661
For code organization, it'd be good to get the implementation of these methods out of frame.py
and to a more suitable location - pandas.core.methods.to_dict
Comment From: jbrockmendel
i dont think the to_*
heuristic works. you wouldn't want to move to_numpy
to pd.io would you? Certainly not to_timestamp?
Comment From: rhshadrach
Fair point - other than a new file inside of core, I don't see a good location for something like this. Also, is there opposition to moving the implementation of to_dict
outside of frame.py
in the first place?
Comment From: jbrockmendel
I don't see a good location for something like this.
ive been thinking a core/methods/ directory might be good for files that are basically just individual refactored-out methods (e.g. describe.py)
Comment From: jreback
+1 in @jbrockmendel idea
Comment From: kostyafarber
Does this still need discussion, happy to have a stab at this if we want to go ahead with the refactor
Comment From: rhshadrach
@kostyafarber - no more discussion is needed - have at it!