Skip to content

REF: Move to_dict implementation to pandas.core.methods.to_dict #49845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rhshadrach opened this issue Nov 22, 2022 · 6 comments · Fixed by #50253
Closed

REF: Move to_dict implementation to pandas.core.methods.to_dict #49845

rhshadrach opened this issue Nov 22, 2022 · 6 comments · Fixed by #50253
Labels
Clean IO Data IO issues that don't fit into a more specific label Refactor Internal refactoring of code

Comments

@rhshadrach
Copy link
Member

rhshadrach commented Nov 22, 2022

Ref: #46487 (review)

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

@rhshadrach rhshadrach added Refactor Internal refactoring of code IO Data IO issues that don't fit into a more specific label Clean labels Nov 22, 2022
@jbrockmendel
Copy link
Member

i dont think the to_* heuristic works. you wouldn't want to move to_numpy to pd.io would you? Certainly not to_timestamp?

@rhshadrach
Copy link
Member Author

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?

@rhshadrach rhshadrach added the Needs Discussion Requires discussion from core team before further action label Nov 23, 2022
@jbrockmendel
Copy link
Member

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)

@jreback
Copy link
Contributor

jreback commented Nov 24, 2022

+1 in @jbrockmendel idea

@rhshadrach rhshadrach changed the title REF: Move to_dict implementation to pandas.io REF: Move to_dict implementation to pandas.core.methods.to_dict Dec 1, 2022
@kostyafarber
Copy link
Contributor

Does this still need discussion, happy to have a stab at this if we want to go ahead with the refactor

@rhshadrach
Copy link
Member Author

@kostyafarber - no more discussion is needed - have at it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean IO Data IO issues that don't fit into a more specific label Refactor Internal refactoring of code
Projects
None yet
4 participants