Skip to content

ENH: Transparent Excel2Pandas import and reverse export. Excel file editing through pandas and vice versa. #48934

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
2 of 3 tasks
heijligers opened this issue Oct 4, 2022 · 5 comments
Labels
Closing Candidate May be closeable, needs more eyeballs Enhancement IO Excel read_excel, to_excel

Comments

@heijligers
Copy link

heijligers commented Oct 4, 2022

Feature Type

  • Adding new functionality to pandas

  • Changing existing functionality in pandas

  • Removing existing functionality in pandas

Problem Description

I want to have a human readible and editable step in my pandas dataframe process.

For example. I have a dataframe. I save it to excel. Later in the software I recreate the pandas dataframe from that excel.
Now I can manually edit the information in the excel outside of python.

I am missing a to_excel method that manages to save as much of the metadata information as possible (if necessary in seperate additional sheets) so that when I later recreate the the dataframe from excel all my original structure (such as data types) is maintained.

Feature Description

A to_excel method that manages to save as much of the metadata information as possible (if necessary in seperate additional sheets) so that when I later recreate the the dataframe from excel all my original structure (such as data types) is maintained.

Alternative Solutions

Open to suggestions

Additional Context

No response

@heijligers heijligers added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 4, 2022
@rhshadrach rhshadrach added the IO Excel read_excel, to_excel label Oct 4, 2022
@jbrockmendel
Copy link
Member

Pls add an informative title

@rhshadrach
Copy link
Member

This sounds too complex to support. Excel is a format which does not store different data types well, and we'd be trying to hack something in. -1

@rhshadrach rhshadrach added Closing Candidate May be closeable, needs more eyeballs and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 15, 2022
@rhshadrach rhshadrach changed the title ENH: ENH: DataFrame metadata in Excel Dec 15, 2022
@heijligers
Copy link
Author

May I Ask for a reconsideration?
For example:
The use case I am describing is a planning analysis framework with generally only numerical, string or categorical values. To make the configuration of this tool also accessible to non-python users, an intermediate storage in excel's files would facility usability for legacy users.

I understand that storing complex data types would be quite a complex process. For numerical, string and categorical values this could be doable. Very similar to how I can import SPSS files with extended meta data into Pandas and (when I haven't changed the structure of data vs metadeta) can export it again to an equivalent SPSS file.

Alternatively:
When you take a PANDAS FIRST perspective I fully understand your position.
The second use case for my request would be a EXCEL First. In a heavy excel centric environment it would be great to transparently import an excel file, modify it's values and than export the excel again, maintaining EXCEL Style elements. (Formulas would be replaced by values at import)

@heijligers heijligers changed the title ENH: DataFrame metadata in Excel ENH: Transparent Excel2Pandas import and reverse export. Excel file editing through pandas and vice versa. Dec 17, 2022
@jreback
Copy link
Contributor

jreback commented Dec 17, 2022

this is too complex to put in main pandas - you are welcome to make a package that does this but it's ot for core

-1 on extending here

@phofl
Copy link
Member

phofl commented Dec 18, 2022

Agreed, this is out of scope for us. Closing for now

@phofl phofl closed this as completed Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closing Candidate May be closeable, needs more eyeballs Enhancement IO Excel read_excel, to_excel
Projects
None yet
Development

No branches or pull requests

5 participants