Skip to content

DOC: IO tools OpenDocument spreadsheets har wrong information on missing implementation for writing ODF-files #50487

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
1 task done
frodeseverin opened this issue Dec 29, 2022 · 2 comments · Fixed by #50498
Assignees
Labels
Docs IO Excel read_excel, to_excel

Comments

@frodeseverin
Copy link

Pandas version checks

  • I have checked that the issue still exists on the latest versions of the docs on main here

Location of the documentation

IO tools OpenDocument spreadsheets
Version 1.5.2 (stable)

Documentation problem

The good news of support in pandas for writing OpenDocument spreadsheets has not propagated from the 'dev' branch of the documentation to applicable documentation versions, i.e from 1.1.0 onwards.

There is a dependency on the odfpy package, as mentioned here:
https://stackoverflow.com/questions/58915626/write-dataframe-into-ods-format

I checked the functionality with pandas version 1.5.2 after manually installing odfpy, and it works like a snap.

The documentation for version 1.5.2 states:

! Note
Currently pandas only supports reading OpenDocument spreadsheets. Writing is not implemented.

The documentation for dev states:

! New in version 1.1.0.
Similarly, the to_excel() method can write OpenDocument spreadsheets

# Writes DataFrame to a .ods file
df.to_excel("path_to_file.ods", engine="odf")

There is no mention of the dependency on odfpy.

Suggested fix for documentation

! New in version 1.1.0.
Similarly, the to_excel() method can write OpenDocument spreadsheets

# Writes DataFrame to a .ods file
df.to_excel("path_to_file.ods", engine="odf")

This functionality depends on the odfpy package, which needs to be installed manyally with e.g. pip for the time being.

@frodeseverin frodeseverin added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 29, 2022
@phofl
Copy link
Member

phofl commented Dec 29, 2022

Hi, thanks for your report. This is fixed on the current version of our docs (dev).

Sorry for the close: I thought the last sentence was from the docs as well. PRs to add this welcome

@phofl phofl closed this as completed Dec 29, 2022
@phofl phofl reopened this Dec 29, 2022
@phofl phofl added IO Excel read_excel, to_excel and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 29, 2022
@luke396
Copy link
Contributor

luke396 commented Dec 30, 2022

take

luke396 pushed a commit to luke396/pandas that referenced this issue Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs IO Excel read_excel, to_excel
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants