uncommon data for dec 1 and 7

This commit is contained in:
Pritimay Sarkar
2023-12-15 10:17:52 +05:30
parent 7bcdbff123
commit 590c7494bd
7 changed files with 256 additions and 0 deletions

14
scripts/uncommon.py Normal file
View File

@@ -0,0 +1,14 @@
import pandas as pd
# Sample DataFrames
df1 = pd.DataFrame({'A': [1, 2, 3, 4],
'B': ['a', 'b', 'c', 'd']})
df2 = pd.DataFrame({'A': [3, 4, 5, 6],
'B': ['c', 'd', 'e', 'f']})
# Find uncommon elements
uncommon_df = pd.concat([df1, df2, df2]).drop_duplicates(keep=False)
# Display the resulting DataFrame
print(uncommon_df)