IIUC: Вот что вы можете сделать:
from pandas.compat import StringIO
import pandas as pd
import numpy as np
text = '''title url
title1 URL1
title1 URL2
title1 URL3
title1 URL4
title1 URL5
title1 URL6'''
df = pd.read_csv(StringIO(text), sep='\s+')
#Drop duplicates by keeping first
df['title'] = df['title'].drop_duplicates(keep='first')
#Replace nan with white space
df = df.replace(np.nan, ' ', regex=True)
df.to_html('test.html')
Вы получите следующий результат:
