Is there a pandas or numpy function that recognizes if a new month has come up from looking at the if the Month(MM) is incremented by 1 with the format YYYY-MM-DD-TTTT. So in the sample below I am trying to see if a function can indicate which index the Date goes from October 2015-10-31 23:59:00 to December 2015-11-01 00:00:00.
Code
import pandas as pd
#Getting the input from a csv file
data= 'input.csv'
#Reverses all the table data values
data1 = data.iloc[::-1].reset_index(drop=True)
#Getting The date column
Date = np.array(data1['Date'])
Portion of Dates, the 11th index is when it goes from October to November
['2015-10-31 23:50:00' '2015-10-31 23:51:00' '2015-10-31 23:52:00'
'2015-10-31 23:53:00' '2015-10-31 23:54:00' '2015-10-31 23:55:00'
'2015-10-31 23:56:00' '2015-10-31 23:57:00' '2015-10-31 23:58:00'
'2015-10-31 23:59:00' '2015-11-01 00:00:00' '2015-11-01 00:01:00'
'2015-11-01 00:02:00' '2015-11-01 00:03:00' '2015-11-01 00:04:00'
Expected Output
At the 11th index the Month changes