Skip to content

BUG: Error writing an empty DataFrame to an ods file #45793

Closed
@rhshadrach

Description

@rhshadrach

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

with pd.ExcelWriter('test.ods') as writer:
    DataFrame().to_excel(writer)

Issue Description

Raises ValueError: max() arg is an empty sequence

Expected Behavior

Write an empty sheet

Installed Versions

Replace this line with the output of pd.show_versions()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions