Here's a rough draft of my code
file_n = 'Customers_1';
ext = '.xlsx';
filename = file_n+ext;
df = pd.read_excel(filename,sheet_name="Sheet1");
df.rename(columns={'CustomerId':'crn','LastVisitedDateTime':'time'}, inplace=True);
df_temp= df.groupby(df.PageName).crn.count();
df_t=df.loc[df.PageName == 'Login',['crn','PageName','time']];
Getting the following error-:
'Passing list-likes to .loc or [] with any missing labels is no longer supported, see https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#deprecate-loc-reindex-listlike'