tl; dr: how can i skip periods when there is no data when planning time series?
I have a long calculation, and I would like to monitor his progress. Sometimes I interrupt this calculation. Logs are stored in a huge CSV file, which looks like this:
2016-01-03T01:36:30.958199,0,0,0,startup 2016-01-03T01:36:32.363749,10000,0,0,regular ... 2016-01-03T11:12:21.082301,51020000,13402105,5749367,regular 2016-01-03T11:12:29.065687,51030000,13404142,5749367,regular 2016-01-03T11:12:37.657022,51040000,13408882,5749367,regular 2016-01-03T11:12:54.236950,51050000,13412824,5749375,shutdown 2016-01-03T19:02:38.293681,51050000,13412824,5749375,startup 2016-01-03T19:02:49.296161,51060000,13419181,5749377,regular 2016-01-03T19:03:00.547644,51070000,13423127,5749433,regular 2016-01-03T19:03:05.599515,51080000,13427189,5750183,regular ...
In fact, there are 41 columns. Each of the columns is a specific indicator of progress. The second column always increases in increments of 10000. The last column is self-explanatory.
I would like to build each column on the same chart, skipping the gaps between shutdown and startup. Ideally, I would also like to draw a vertical line on each pass.
Here is what I have so far:
import matplotlib.pyplot as plt import pandas as pd

I want to get rid of this long flat period and just draw a vertical line.
I know about df.plot() , but in my experience it is broken (by the way, Pandas converts datetime objects to its own format instead of using date2num and num2date ).
It seems like a possible solution is to write a custom scanner , but that seems pretty complicated.
As I understand it, writing a custom Locator will only change the positions of ticks (small vertical lines and associated labels), but not the position of the chart itself. It is right?
UPD: a simple solution would be to change the timestamps (for example, recount them to "time elapsed since launch"), but I would prefer to save them.
UPD: the answer to https://stackoverflow.com/a/3/98740/ ... works for me with some changes. I will write my decision soon.