-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path5_mergeFramesWithExtractedParagraphes.py
More file actions
27 lines (22 loc) · 1.24 KB
/
Copy path5_mergeFramesWithExtractedParagraphes.py
File metadata and controls
27 lines (22 loc) · 1.24 KB
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
#!/usr/bin/env python3
import pandas as pd
if __name__ == '__main__':
all_frames = []
all_filenames = ["./frame_v2_1_NegativeSamples.csv",
"./frame_v2_2_NegativeSamples.csv",
"./frame_v2_3_NegativeSamples.csv",
"./frame_v2_4_NegativeSamples.csv",
"./frame_v2_5_NegativeSamples.csv",
"./frame_v2_6_NegativeSamples.csv",
"./frame_v2_7_NegativeSamples.csv",
"./frame_v2_8_NegativeSamples.csv",
"./frame_v2_9_NegativeSamples.csv",
"./frame_v2_10_NegativeSamples.csv",
"./frame_v2_11_NegativeSamples.csv",
"./frame_v2_12_NegativeSamples.csv"]
for filename in all_filenames:
df = pd.read_csv(filename, index_col=None, header=0, usecols = ['patent_application_id','patent_citation_id','application_claim_number','application_claim_text','related_passages_against_claim','category','paragraphes','paragraph_keyword_found'])
all_frames.append(df)
merged_frame = pd.concat(all_frames, axis=0, ignore_index=True)
print(merged_frame.head())
merged_frame.to_csv("./frame_v2_negativeSamples.csv", index=False)