Skip to main contentSkip to solution

Arrange the following statements in the proper order to plot a bar graph.

(A) save the graph.

(B) display the graph.

(C) import matplot library.

(D) import the records from CSV file in a dataframe.

Solution

✅ Correct Option: 2

(C) import matplotlib library: the plotting library must be loaded before any plotting is done.

(D) import the records from the CSV file into a dataframe: this supplies the data to be plotted.

(B) display the graph: the bar graph is drawn and shown with the data.

(A) save the graph: the graph is saved last, after it has been displayed.

Keyboard Shortcuts

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