-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintegrity.py
More file actions
27 lines (22 loc) · 727 Bytes
/
Copy pathintegrity.py
File metadata and controls
27 lines (22 loc) · 727 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
#moves things into the oops folder
#i make some mistakes
import glob
import pandas as pd
import os
look_at_folder = ".\oops"
if __name__ == "__main__":
m_file_list = glob.glob(look_at_folder + "\*")
m_bad = 0
yeet = 0
for m_f in m_file_list:
m_df = len(pd.read_csv(m_f).columns)
if m_df == 6:
os.rename(m_f, m_f.replace("oops", "SH_data\label_sets\labeled\\no_d"))
# if 'reason' not in m_df.columns:
# m_df['reason'] = 'zzz'
# #os.rename(m_f, m_f.replace("oops", "SH_data\label_sets\labeled\\no_d"))
# m_bad += 1
# m_df.to_csv(m_f, index = False)
yeet += 1
print("=================")
print(yeet, m_bad)