0

I have this kind of dataframe :

shopping_center_id  device_local_date              day_of_week
19365   2                   01/09/2019 00:19                       7
27055   4                   01/09/2019 00:26                       7
27014   4                   01/09/2019 00:26                       7
26906   4                   01/09/2019 00:26                       7
28422   4                   01/09/2019 00:26                       7

I would like to count the number of times a shopping center id has been visited at a given time ? I tried many combinations with groupby and count and didn't get any the wanted result Thanks in advance

data_new['Count']=data_new.groupby('device_local_date')['shopping_center_id'].count()

this gave me a column of Count filled with "Nan"

furas
  • 134,197
  • 12
  • 106
  • 148
Lagos
  • 11
  • 3

0 Answers0