您可以使用.resample('15M').apply(pd.Series.unique)
import pandas as pd
s = pd._testing._make_timeseries()["id"]
print(s)
# timestamp
# 2000-01-01 985
# 2000-01-02 983
# 2000-01-03 1003
# 2000-01-04 962
# 2000-01-05 985
# ...
# 2000-12-27 1034
# 2000-12-28 1000
# 2000-12-29 947
# 2000-12-30 990
# 2000-12-31 956
# Freq: D, Name: id, Length: 366, dtype: int64
print(s.resample("4D").apply(pd.Series.unique))
# timestamp
# 2000-01-01 [985, 983, 1003, 962]
# 2000-01-05 [985, 993, 1008, 1033]
# 2000-01-09 [953, 993, 1009, 1014]
# 2000-01-13 [1045, 1009, 1030, 938]
# 2000-01-17 [1018, 998, 1003, 1070]
# ...
# 2000-12-14 [965, 1030, 1043, 1003]
# 2000-12-18 [947, 1001, 986, 937]
# 2000-12-22 [951, 1024, 980, 965]
# 2000-12-26 [943, 1034, 1000, 947]
# 2000-12-30 [990, 956]
# Freq: 4D, Name: id, Length: 92, dtype: object