22 lines
701 B
Python
22 lines
701 B
Python
|
|
import pandas as pd
|
||
|
|
import os
|
||
|
|
import numpy as np
|
||
|
|
import matplotlib.pyplot as plt
|
||
|
|
|
||
|
|
curdir = os.getcwd()
|
||
|
|
path_delim = '/'
|
||
|
|
df1 = pd.read_excel(curdir + path_delim + "data/Nov22b.xlsx", sheet_name="op")
|
||
|
|
df2 = pd.read_excel(curdir + path_delim + "data/Nov22.xlsx", sheet_name="op")
|
||
|
|
|
||
|
|
# df2 = df2.sort_values('testTime')
|
||
|
|
|
||
|
|
df = df1.merge(df2, on="Sample ID", how="inner")
|
||
|
|
uncommon_df = pd.concat([df1, df2, df2]).drop_duplicates(keep=False)
|
||
|
|
|
||
|
|
# Display the resulting DataFrame
|
||
|
|
print(uncommon_df)
|
||
|
|
|
||
|
|
writer = pd.ExcelWriter(curdir + path_delim + "data/Nov22b.xlsx", engine = 'openpyxl')
|
||
|
|
uncommon_df.to_excel(writer, sheet_name = 'op', index=False)
|
||
|
|
uncommon_df.to_excel(writer, sheet_name = "count")
|
||
|
|
writer.close()
|