8000 MAINT: Remove non-standard and inconsistently-used imports by jbrockmendel · Pull Request #17085 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

MAINT: Remove non-standard and inconsistently-used imports #17085

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

Merged
merged 5 commits into from
Aug 3, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'master' into import_cleanup
  • Loading branch information
jbrockmendel authored Aug 2, 2017
commit 640be57c1f0fe4c34f9d0236de466981f7fd2262
24 changes: 24 additions & 0 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1597,6 +1597,30 @@ def to_feather(self, fname):
from pandas.io.feather_format import to_feather
to_feather(self, fname)

def to_parquet(self, fname, engine='auto', compression='snappy',
**kwargs):
"""
Write a DataFrame to the binary parquet format.

.. versionadded:: 0.21.0

Parameters
----------
fname : str
string file path
engine : {'auto', 'pyarrow', 'fastparquet'}, default 'auto'
Parquet reader library to use. If 'auto', then the option
'io.parquet.engine' is used. If 'auto', then the first
library to be installed is used.
compression : str, optional, default 'snappy'
compression method, includes {'gzip', 'snappy', 'brotli'}
kwargs
Additional keyword arguments passed to the engine
"""
from pandas.io.parquet import to_parquet
to_parquet(self, fname, engine,
compression=compression, **kwargs)

@Substitution(header='Write out the column names. If a list of strings '
'is given, it is assumed to be aliases for the '
'column names')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanted to re-add this since my response got hidden: if there are other places that use this documentation, feel free to patch those too. For bonus points, go ahead and see if you can create a shared resource in a _shared_docs dictionary for example that we can import and plugin this docstring.

< 8000 div id="r129761838" class="timeline-comment-group js-minimizable-comment-group js-targetable-element my-0 comment previewable-edit js-task-list-container js-comment review-comment js-minimize-container unminimized-comment">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already copied the edits into the other docstrings, choosing bed over _shared_docs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

choosing bed over _shared_docs.

That's fair. Let me know if you're able to get around to the _shared_docs (@jreback thoughts?) once you get up 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest moving on and leaving this be. As it is to_csv.__doc__ is all in one piece and I'm not inclined to disturb it.

Unrelated: is there a time in the foreseeable future when Panel etc will be deprecated-as-in-deleted?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it is to_csv.doc is all in one piece and I'm not inclined to disturb it.

Fair enough. I can discuss with @jreback how we might want to proceed with this.

Regarding Panel, I do not know at this point. My guess is 1.0, but I would wait to see what @jreback or @jorisvandenbossche have to say about this.

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
0