Skip to content

Fix misleading error message in _assert_is_pandas_df #252

@nathanjmcdougall

Description

@nathanjmcdougall

This helper function _assert_is_pandas_df is called for a variety of file formats, but the error message mentions CSV specifically:

def _assert_is_pandas_df(x):
import pandas as pd
if not isinstance(x, pd.DataFrame):
raise NotImplementedError(
"Currently only pandas.DataFrame can be saved to a CSV."
)

I think this function should be changed to accept a type argument so that an appropriate message can be constructed dynamically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions