Datasets:

srzhang commited on
Commit
64eb1a3
·
1 Parent(s): a35ba9c
Files changed (1) hide show
  1. sample_length.py +18 -0
sample_length.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import pandas as pd
3
+
4
+ # Specify the path to the train.csv file
5
+ train_csv_path = "data/LongConL-tasks/ATS-Jurisdiction/train.csv" # Update with your actual path
6
+
7
+ try:
8
+ # Load the CSV file into a pandas DataFrame
9
+ train_data = pd.read_csv(train_csv_path)
10
+
11
+ # Get the number of samples
12
+ num_samples = len(train_data)
13
+
14
+ print(f"The train.csv file contains {num_samples} samples.")
15
+ except Exception as e:
16
+ print("An error occurred while loading the train.csv file:")
17
+ print(e)
18
+