Suppose I have a csv file and I've changed colors of some rows. Now I have a new csv file that I am downloading from the internet. It has some new rows and some old. I want to find the unique data in the new file and append it to the old file while retaining any color changes.
I am able to do everything else but the colors are getting reset. Here is what I'm doing.
old_data = pd.read_csv('old_data.csv')
new_data = pd.read_csv('new_data.csv')
unique_data = new_data[~new_data['Booking Reference'].isin(old_data['Booking Reference'])]
unique_data.to_csv('old_data.csv', 'a')
Doing this way resets the colors. Is there a way to retain that information?
Any help is greatly appreciated.