-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
poor melt example in documentation #23844
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
Comments
cc @jreback |
Are the sources of the figures already available somewhere? If not, would it be worth to store the SVG sources in git so that they can be easily edited in the future? |
@MLopez-Ibanez : Have a look at this directory: |
Those do not seem to be source files (I would expect either a script to recreate the files or svg or some other source format) |
Ah, sorry, I don't believe we have said files unfortunately... |
Somebody created the images. Perhaps they have the source files? It would be useful to know at least the fonts and font sizes used, to be consistent. |
From the closed PR:
(Nevertheless that most examples in that page use "A" and "B" as columns...) The original assets are available here: #28006 (comment) but they are in non-free formats. |
Problem description
The example chosen to illustrate
melt
https://pandas.pydata.org/pandas-docs/stable/user_guide/reshaping.html#reshaping-by-melt
is not ideal. Normally, melt would be used to convert from wide to long data. However, the data on the left hand side of the example is already in long format (each variable corresponds to a different column) and the melt command is just creating a strange "thing" where the column value contains two different variables. I'm using this figure in my teaching as an example of what NOT to do when reshaping data.
A better example would be (taken from: https://www.jstatsoft.org/article/view/v059i10)
melted into:
I'm happy to provide a pull request against the docs if this is considered an improvement.
The text was updated successfully, but these errors were encountered: