I am using the Algorithm Framework, and have an Alpha in which I'm trying to maintain a pandas dataframe of the most recent 5 days of Daily history for a small set of securities.

In OnSecuritiesChanged, I have the code that gets the initial history for anything added:

## In OnSecuritiesChanged
symbols_added = [ x.Symbol for x in changes.AddedSecurities ]
df_symbol_history = algorithm.History(symbols_added, self.lookback, self.resolution)[['close']]
self.df_history = pd.concat([self.df_history, df_symbol_history])

In Update, I add the new data:

records = [{ 'symbol': kvp.Value.Symbol, 'time': kvp.Value.Time, 'close': kvp.Value.Close} for kvp in slice]
df_slice = pd.DataFrame.from_records(records, index=['symbol', 'time'])
##Failing on this next line
self.df_history = pd.concat([self.df_history, df_slice])

This seems to me to be the most straightforward thing in the world, but it's not working.  When I run this as is, Update ends up throwing a ‘Categorical categories must be unique’ exception.  I've confirmed that there are no categorical datatypes in the dataframe (and you can see from the code that should be impossible).

Any ideas what I'm doing wrong here?