参考: https://stackoverflow.com/a/33381246/11842985
duplicated_rows = df[df.index.duplicated(keep=False)] duplicated_rows.sort_index()
このページの著者: takanotume24