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
Show file tree
Hide file tree
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
Next Next commit
Fix line wrapping
  • Loading branch information
jbrockmendel committed Aug 2, 2017
commit 894daa246e35e37063de171f00e8f731f9be743c
5 changes: 3 additions & 2 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1597,8 +1597,9 @@ def to_feather(self, fname):
from pandas.io.feather_format import to_feather
to_feather(self, fname)

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

Choose a reason for hiding this comment

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

Write out column --> Write out the column
list of string --> list of strings

Copy link
Member Author

Choose a reason for hiding this comment

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

Happy to make this edit, but note that this substitution appears to be copy/pasted from the to_csv docstring. Should the same edit be made there?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, absolutely! Go ahead and patch that there too. Perhaps we need to share that documentation somewhere.

'given, it is assumed to be aliases for the column '
'names')
@Appender(fmt.docstring_to_string, indents=1)
def to_string(self, buf=None, columns=None, col_space=None, header=True,
index=True, na_rep='NaN', formatters=None, float_format=None,
Expand Down
5 changes: 3 additions & 2 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1702,8 +1702,9 @@ def to_xarray(self):
.. versionadded:: 0.20.0
"""

@Substitution(header='Write out column names. If a list of string is given, \
it is assumed to be aliases for the column names.')
@Substitution(header='Write out column names. If a list of string 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.

Same comments as above

Copy link
Member Author

Choose a reason for hiding this comment

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

Same comment as above, but with generic._shared_docs['to_excel']

Copy link
Member

Choose a reason for hiding this comment

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

Same answer as above

@Appender(_shared_docs['to_latex'] % _shared_doc_kwargs)
def to_latex(self, buf=None, columns=None, col_space=None, header=True,
index=True, na_rep='NaN', formatters=None, float_format=None,
Expand Down
14 changes: 7 additions & 7 deletions pandas/core/indexing.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# pylint: disable=W0223

import textwrap
import warnings
import numpy as np
from pandas.compat import range, zip
Expand Down Expand Up @@ -1288,13 +1288,13 @@ class _IXIndexer(_NDFrameIndexer):

def __init__(self, obj, name):

_ix_deprecation_warning = """
.ix is deprecated. Please use
.loc for label based indexing or
.iloc for positional indexing
_ix_deprecation_warning = textwrap.dedent("""
.ix is deprecated. Please use
.loc for label based indexing or
.iloc for positional indexing

See the documentation here:
http://pandas.pydata.org/pandas-docs/stable/indexing.html#ix-indexer-is-deprecated""" # noqa
See the documentation here:
http://pandas.pydata.org/pandas-docs/stable/indexing.html#ix-indexer-is-deprecated""") # noqa

warnings.warn(_ix_deprecation_warning,
DeprecationWarning, stacklevel=3)
Expand Down
0