Created
November 18, 2016 19:51
-
-
Save dansteingart/e12bc379cabfc18df13f32c4369b4169 to your computer and use it in GitHub Desktop.
get_close_time.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Author: | |
##Date Started: | |
##Notes: | |
from pithy import * | |
import libMotorPhoton as lmp | |
from datetime import datetime as dt | |
import time | |
photon = lmp.motorPhoton("MischievousMelon") | |
data = photon.getHistory("2016-11-09") | |
want = time.mktime((2016,11,9,12+4,20,0,0,0,0)) | |
close = abs(data['time']-want).argmin() | |
print data.iloc[close] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment