Skip to content

Update DataFrame.to_feather() docstring/api documentation and deprecate fname argument. #29532

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
simonjayhawkins opened this issue Nov 10, 2019 · 0 comments · Fixed by #35408
Labels
API - Consistency Internal Consistency of API/Behavior Deprecate Functionality to remove in pandas Docs IO Parquet parquet, feather

Comments

@simonjayhawkins
Copy link
Member

Code Sample, a copy-pastable example if possible

This code works.

import pandas as pd
import pandas.util.testing as tm
from io import BytesIO

df = pd.DataFrame({"a": [1, 2, 3], "b": list("abc")})

buf = BytesIO()
df.to_feather(fname=buf)
result = pd.read_feather(path=buf)

tm.assert_frame_equal(result, df)

Problem description

Documentation doesn't mention accepting a buffer.

    def to_feather(self, fname):
        """
        Write out the binary feather-format for DataFrames.

        Parameters
        ----------
        fname : str
            String file path.
        """

Expected Output

change argument name to better reflect types accepted and be consistent with other io methods.

would need to deprecate fname argument.

Output of pd.show_versions()

[paste the output of pd.show_versions() here below this line]

@simonjayhawkins simonjayhawkins added Docs IO Data IO issues that don't fit into a more specific label Deprecate Functionality to remove in pandas labels Nov 10, 2019
@jbrockmendel jbrockmendel added IO Parquet parquet, feather API - Consistency Internal Consistency of API/Behavior and removed IO Data IO issues that don't fit into a more specific label labels Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API - Consistency Internal Consistency of API/Behavior Deprecate Functionality to remove in pandas Docs IO Parquet parquet, feather
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants