We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 576f0a8 commit 99da02eCopy full SHA for 99da02e
pandas/tests/plotting/test_hist_method.py
@@ -209,6 +209,16 @@ def test_hist_df_legacy(self):
209
with pytest.raises(AttributeError):
210
ser.hist(foo='bar')
211
212
+ @pytest.mark.slow
213
+ def test_hist_non_numerical(self):
214
+ # check non-numerical df raises appropriate exception and error message
215
+ df = DataFrame(np.random.rand(10, 2))
216
+ df_o = df.astype(np.object)
217
+
218
+ msg = "hist method requires numerical columns, nothing to plot."
219
+ with pytest.raises(ValueError, match=msg):
220
+ df_o.hist()
221
222
@pytest.mark.slow
223
def test_hist_layout(self):
224
df = DataFrame(randn(100, 3))
0 commit comments