Question: how to calculate difference between two columns in pandas?
Answer: df = pd. DataFrame(columns=["one", "two"]) df. one = ["2019-01-24","2019-01-27"] df. one = pd. to_datetime(df. ...  df. two = ["2019-01-28", "2020-01-29"] df. two = pd. ...  print(df) difference = (df. two - df. ...  print(difference)