Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow list-like for `y` in `DataFrame.plot`. #19699
In pandas 0.22 and earlier, we passing multiple values for
In : df = pd.DataFrame(np.random.uniform(size=(10, 2)), columns=['a', 'b']) In : df.plot(x='c', y=['a', 'b']) /Users/taugspurger/miniconda3/envs/pandas-0.21.0/lib/python3.6/site-packages/pandas/plotting/_core.py:1714: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access series.name = label Out: <matplotlib.axes._subplots.AxesSubplot at 0x10f83b198>
On master, this will currently raise. I think that we should explicitly support list-likes for
Tagging for 0.23 since I think this should be a blocker.
xref #18695 where we made the change.
Gotcha - this only makes sense if a and b are on the "same" scale right?
To get a sensible plot, yes, but users are free to do whatever :) `secondary_y` is for creating a plot with two independent y-axes. Accepting a list-like for `y` would allow for an arbitrary number of lines all with the same y axis.…
On Mon, Feb 26, 2018 at 11:29 AM, Mason Gallo ***@***.***> wrote: Gotcha - this only makes sense if a and b are on the "same" scale right? The plot method has a secondary_y arg but I'm not sure it makes sense to use in a general case like this. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#19699 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABQHIic1OXLIgvMTc6vIdrxOQ3f6sn6Jks5tYuoNgaJpZM4SFw5J> .