-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
27 lines (17 loc) · 723 Bytes
/
test.py
File metadata and controls
27 lines (17 loc) · 723 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
'''import os
dataset_path = "/config\\data\\docs-sm"
files = os.listdir(dataset_path)
print(f"Total documents: {len(files)}")
print("Sample files:", files[:5])
df = pd.DataFrame(data, columns=["text", "label"])
df.to_csv("dataset.csv", index=False)
print("✅ Dataset saved as dataset.csv")
print(df.head()) # Print first 5 rows for verification'''
import pandas as pd
df = pd.read_csv(r"C:\Users\91800\OneDrive\Desktop\NLP\src\results\extracted_invoices.csv") # Update the path if needed
print(df)
import csv
with open(r"C:\Users\91800\OneDrive\Desktop\NLP\src\results\extracted_invoices.csv", mode="r") as file:
reader = csv.reader(file)
for row in reader:
print(row)