title: Check for inconsistencies in a pandas data frame
body: <p>I have this data set with timestamps &amp; station IDs and I'm trying to check for any inconsistencies  before performing my analysis. I was able to do that for the time stamp &amp; durations with the below code (a). I'm trying to do the same to check if the start station ID is consistent with the station name &amp; coordinates but I'm not sure how</p>
  <p>By inconsistencies I mean if one station name show more than one ID or coordinates, the same applies for ID vs coordinates.</p>
  <p>Also, here's the link to the data set
  <a href="https://video.udacity-data.com/topher/2020/October/5f91cf38_201902-fordgobike-tripdata/201902-fordgobike-tripdata.csv" rel="nofollow noreferrer">https://video.udacity-data.com/topher/2020/October/5f91cf38_201902-fordgobike-tripdata/201902-fordgobike-tripdata.csv</a></p>
  <p><img src="https://i.stack.imgur.com/BuBRK.png" alt="Here's a picture showing the data frame info" /></p>
  <pre><code>        duration_sec                start_time                  end_time  start_station_id                                start_station_name  ...  bike_id   user_type  member_birth_year member_gender  bike_share_for_all_trip
  0              52185  2019-02-28 17:32:10.1450  2019-03-01 08:01:55.9750              21.0  Montgomery St BART Station (Market St at 2nd St)  ...     4902    Customer             1984.0          Male                       No
  1              42521  2019-02-28 18:53:21.7890  2019-03-01 06:42:03.0560              23.0                     The Embarcadero at Steuart St  ...     2535    Customer                NaN           NaN                       No
  2              61854  2019-02-28 12:13:13.2180  2019-03-01 05:24:08.1460              86.0                           Market St at Dolores St  ...     5905    Customer             1972.0          Male                       No
  3              36490  2019-02-28 17:54:26.0100  2019-03-01 04:02:36.8420             375.0                           Grove St at Masonic Ave  ...     6638  Subscriber             1989.0         Other                       No
  4               1585  2019-02-28 23:54:18.5490  2019-03-01 00:20:44.0740               7.0                               Frank H Ogawa Plaza  ...     4898  Subscriber             1974.0          Male                      Yes
  ...              ...                       ...                       ...               ...                                               ...  ...      ...         ...                ...           ...                      ...
  183407           480  2019-02-01 00:04:49.7240  2019-02-01 00:12:50.0340              27.0                           Beale St at Harrison St  ...     4832  Subscriber             1996.0          Male                       No
  183408           313  2019-02-01 00:05:34.7440  2019-02-01 00:10:48.5020              21.0  Montgomery St BART Station (Market St at 2nd St)  ...     4960  Subscriber             1984.0          Male                       No
  183409           141  2019-02-01 00:06:05.5490  2019-02-01 00:08:27.2200             278.0                            The Alameda at Bush St  ...     3824  Subscriber             1990.0          Male                      Yes
  183410           139  2019-02-01 00:05:34.3600  2019-02-01 00:07:54.2870             220.0                       San Pablo Ave at MLK Jr Way  ...     5095  Subscriber             1988.0          Male                       No
  183411           271  2019-02-01 00:00:20.6360  2019-02-01 00:04:52.0580              24.0                             Spear St at Folsom St  ...     1057  Subscriber             1989.0          Male                       No
  </code></pre>
  <p>a-</p>
  <pre><code>#Convert Start &amp; End Time to date time &amp; Check integrity of duration
  df.start_time = pd.to_datetime(df.start_time)
  df.end_time = pd.to_datetime(df.end_time)
  df['calc_duration'] = df['end_time']-df['start_time']
  df['calc_duration'] =df['calc_duration']/np.timedelta64(1,'s')
  df['dur_diff']=np.abs(df['duration_sec']-df['calc_duration'])
  df=df[df.dur_diff &lt;= 1]
  df.info()
  </code></pre>