Skip to main contentSkip to solution

Pandas has a built in .plot() function as a part of the ____________ class.

Solution

✅ Correct Option: 4

The .plot() method is built into the Pandas DataFrame class, so you can call it directly as df.plot(). It wraps Matplotlib and draws line, bar, histogram and scatter charts straight from the data.


Option 1: Array is not a Pandas class. NumPy's ndarray has no built-in .plot() method.

Options 2 and 3: Pandas has no classes named Plot or MatPlot. The plotting library is Matplotlib, which Pandas calls behind the scenes.

The Series class also has its own .plot() method.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question