diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 476bcd7da8d91..0f59d3a1d417c 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -2860,12 +2860,14 @@ def plot(self, subplots=False, sharex=True, sharey=False, use_index=True, x = range(len(self)) for i, col in enumerate(_try_sort(self.columns)): + empty = self[col].count() == 0 + y = self[col].values if not empty else np.zeros(x.shape) if subplots: ax = axes[i] - ax.plot(x, self[col].values, 'k', label=col, **kwds) + ax.plot(x, y, 'k', label=col, **kwds) ax.legend(loc='best') else: - ax.plot(x, self[col].values, label=col, **kwds) + ax.plot(x, y, label=col, **kwds) ax.grid(grid)