Both the codes are used to concatenate the dataframes.
pd.concatenate(frames)
This code will take dataframes in the frames list and concatenate them forming a new dataframe.
pd.concatenate(frames, key[])
This code will also concatenate the dataframes but the difference is that this code will add certain keys to the newly formed database to identify those dataframes. This is how the data is stored:
Here, x is the key to dataframe df1, y is the key to dataframe df2, z is the key to dataframe df3.