LibbyK

Untitled

Feb 19th, 2020
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import pandas as pd
  2.  
  3. data = pd.read_csv('/datasets/visits_eng.csv', sep='\t')
  4. data['local_time'] = (
  5. pd.to_datetime(data['date_time'], format='%Y-%m-%dT%H:%M:%S')
  6. + pd.Timedelta(hours=7)
  7. )
  8. #print(data.head)
  9.  
  10. #data["too_fast"] = data["time_spent"].apply(lambda x: True if x <60 else False)
  11. data["too_fast"] = data["time_spent"]<60
  12.  
  13. print(data.head())
Advertisement
Add Comment
Please, Sign In to add comment