Hi could anyone help me out? I'm trying to group the IDs and have a counter for the number of "t" found in a column for each ID.
f1 = df3[df3['listing_id'].value_counts().reset_index().str.contains('t')]
count = f1['available'].value_counts().reset_index()
print(count)
print(f1)
An example output would be:
   ID   Number of t
14250             1 
12351            10
...
Thanks

 
    