Data visualization with Pandas and Matplotlib


  • Load your required libraries into Python and use common nicknames
  • Use pandas to load your data –pd.read_csv()– and to explore it –.head(), .tail(), and .info() methods.
  • The .plot() method on your DataFrame is a good plotting starting point.
  • Matplotlib allows you to customize every aspect of your plot. Start with the plt.subplots() function to create a figure object and the number of axes (or subplots) you need.
  • Export plots to a file using the .savefig() method.

Exploring and understanding data


  • pandas DataFrames carry many methods that can help you explore the properties and distribution of data.
  • Using the help function, reading error messages, and asking for help are all good strategies when things go wrong.
  • The type of an object determines what kinds of operations you can perform on and with it.
  • Python evaluates expressions in a line one by one before assigning the final result to a variable.