[Solved] How to store missing date(15 min interval) points from csv into new file (15 minutes interval) -python 3.5


try this:

In [16]: df.ix[df.groupby(df['datetime'].dt.date)['production'].transform('nunique') < 44 * 4 * 24, 'datetime'].dt.date.unique()
Out[16]: array([datetime.date(2015, 12, 7)], dtype=object)

this will give you all rows for the “problematic” days:

df[df.groupby(df['datetime'].dt.date)['production'].transform('nunique') < 44 * 4 * 24]

PS there is a good reason why people asked you for a good reproducible sample data sets – with the one you have provided it’s hardly possible to see whether the code is working correctly or not…

2

solved How to store missing date(15 min interval) points from csv into new file (15 minutes interval) -python 3.5