May-20-2020, 07:51 PM
You can specify the column types instead of letting the read_csv file guess.
dtype
Type name or dict of column -> type, optional
Data type for data or columns. E.g. {‘a’: np.float64, ‘b’: np.int32, ‘c’: ‘Int64’} Use str or object together with suitable na values settings to preserve and not interpret dtype. If converters are specified, they will be applied INSTEAD of dtype conversion.
dtype
Type name or dict of column -> type, optional
Data type for data or columns. E.g. {‘a’: np.float64, ‘b’: np.int32, ‘c’: ‘Int64’} Use str or object together with suitable na values settings to preserve and not interpret dtype. If converters are specified, they will be applied INSTEAD of dtype conversion.