How can we find new IDs added per month? I have this dataframe.
import pandas as pd
import numpy as np
# data stored in dictionary
details = {
'address_id': [111, 111, 111, 111, 222, 222, 222, 333, 333, 444, 444, 555, 555, 777],
'mydate':['2022-01-24', '2022-01-24', '2022-03-28', '2022-03-28', '2022-01-24', '2022-01-24', '2022-03-28', '2022-01-24', '2022-03-28', '2022-01-24', '2022-03-28', '2022-01-24', '2022-04-16', '2022-03-28']
}
df = pd.DataFrame(details)
df
I can easily group by date and find unique IDs
df_id = df.groupby('mydate').address_id.nunique().reset_index()
df_id
But how can I list out newly added IDs and recently dropped IDs? How can I create a list, or dataframe, showing me that 555 did not exist for '2022-03-28', so this is an add. Also, 111, 222, 333, 444, and 777 were all dropped for '2022-04-16'

