8000 REF: repr - allow block to override values that get formatted by jorisvandenbossche · Pull Request #17143 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

REF: repr - allow block to override values that get formatted #17143

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
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
extra redirect + move tests
  • Loading branch information
jorisvandenbossche committed Aug 2, 2017
commit ec7ff5d7ed20c5352c7c2bccbee307da1cdd7de6
6 changes: 5 additions & 1 deletion pandas/core/internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def internal_values(self, dtype=None):
return self.values

def formatting_values(self):
"""Return the internal format used by the DataFrame/SeriesFormatter"""
"""Return the internal values used by the DataFrame/SeriesFormatter"""
return self.internal_values()

def get_values(self, dtype=None):
Expand Down Expand Up @@ -4320,6 +4320,10 @@ def external_values(self):
def internal_values(self):
return self._block.internal_values()

def formatting_values(self):
"""Return the internal values used by the DataFrame/SeriesFormatter"""
return self._block.formatting_values()

def get_values(self):
""" return a dense type view """
return np.array(self._block.to_dense(), copy=False)
Expand Down
6 changes: 3 additions & 3 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,10 @@ def _values(self):
return self._data.internal_values()

def _formatting_values(self):
"""Return the values that can be formatted (used by Series and
DataFrameFormatter)
"""Return the values that can be formatted (used by SeriesFormatter
and DataFrameFormatter)
"""
return self._data._block.formatting_values()
return self._data.formatting_values()

def get_values(self):
""" same as values (but handles sparseness conversions); is a view """
Expand Down
Empty file.
0