Skip to content

Commit 2e2b553

Browse files
oheKevsterAmp
authored andcommitted
DOC: Clarifying pandas.melt method documentation by replacing "massage" by "reshape" (pandas-dev#60420)
Clarifying pandas.melt method documentation by replacing "massage" by "reshape" Meanwhile, "massage" is correct in a colloquial sense to mean transforming or reshaping data. This is far from accessible for a non-English speaker (as I am). Using the term `reshape` or `transform` is more meaningful while being accurate.
1 parent b4707b8 commit 2e2b553

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/source/user_guide/reshaping.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ The missing value can be filled with a specific value with the ``fill_value`` ar
321321
.. image:: ../_static/reshaping_melt.png
322322

323323
The top-level :func:`~pandas.melt` function and the corresponding :meth:`DataFrame.melt`
324-
are useful to massage a :class:`DataFrame` into a format where one or more columns
324+
are useful to reshape a :class:`DataFrame` into a format where one or more columns
325325
are *identifier variables*, while all other columns, considered *measured
326326
variables*, are "unpivoted" to the row axis, leaving just two non-identifier
327327
columns, "variable" and "value". The names of those columns can be customized

pandas/core/reshape/melt.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ def melt(
5151
"""
5252
Unpivot a DataFrame from wide to long format, optionally leaving identifiers set.
5353
54-
This function is useful to massage a DataFrame into a format where one
54+
This function is useful to reshape a DataFrame into a format where one
5555
or more columns are identifier variables (`id_vars`), while all other
56-
columns, considered measured variables (`value_vars`), are "unpivoted" to
56+
columns are considered measured variables (`value_vars`), and are "unpivoted" to
5757
the row axis, leaving just two non-identifier columns, 'variable' and
5858
'value'.
5959

0 commit comments

Comments
 (0)