Whenever you are doing some preprocessing of data in pandas/python and reading data from any CSV file do the following things first.

  1. Trim space in all the columns.
  2. Convert each column in the right datatype.

Contd.