transbigdata.clean_taxi_status

transbigdata.clean_taxi_status(data, col=['VehicleNum', 'Time', 'OpenStatus'], timelimit=None)

Deletes records of instantaneous changes in passenger carrying status from taxi data. These abnormal records can affect travel order judgments. Judgement method: If the passenger status of the previous record and the next record are different from this record for the same vehicle, then this record should be deleted.

Parameters:
  • data (DataFrame) – Data

  • col (List) – Column names, in the order of [‘VehicleNum’, ‘Time’, ‘OpenStatus’]

  • timelimit (number) – Optional, in seconds. If the time between the previous record and the next record is less than the time threshold, then it will be deleted

Returns:

data1 – Cleaned data

Return type:

DataFrame