-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
33 lines (22 loc) · 757 Bytes
/
main.py
File metadata and controls
33 lines (22 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import pandas as pd
from datetime import datetime
# df = pd.read_excel('c:/apps/courses_schedule.xlsx')
df1 = pd.read_csv('in/my.csv')
# print(df1)
df2 = pd.read_csv('in/copy.csv')
# print(df2)
# df = pd.concat([df1, df2])
# print(df)
# print (pd.merge(a,b, indicator=True, how='outer')
# .query('_merge=="left_only"')
# .drop('_merge', axis=1))
# df = pd.merge(df1, df2, indicator=True, how='outer').query('_merge=="left_only"').drop('_merge', axis=1)
# print(df)
cond = df1['email'].isin(df2['email'])
df1.drop(df1[cond].index, inplace=True)
print(df1)
now = datetime.now()
now_as_str = now.strftime("%Y%m%d%H%M%S")
new_file_name = f'output/generate_novo_excel_{now_as_str}.csv'
# saving the excel
# df1.to_csv(new_file_name)