The documentation mentions that "filling while reindexing does not look at dataframe values, but only compares the original and desired indexes." Because 2023-12-31 is missing from the original index, the function will frontfill from the last available index (2023-12-29) regardless of whether that value is present or NaN
.
You can get the function to frontfill the 2023-12-28 value by executing p.drop(pd.Timestamp(2023,12,29))
rather than simply setting the 2023-12-19 value to be NaN
.