add dataset
Browse files- .gitmodules +3 -0
- gold-price-5-years +1 -0
- import csv.py +16 -0
.gitmodules
CHANGED
@@ -28,3 +28,6 @@
|
|
28 |
[submodule "unemployment_rate"]
|
29 |
path = unemployment_rate
|
30 |
url = https://huggingface.co/datasets/bromleyp/unemployment_rate
|
|
|
|
|
|
|
|
28 |
[submodule "unemployment_rate"]
|
29 |
path = unemployment_rate
|
30 |
url = https://huggingface.co/datasets/bromleyp/unemployment_rate
|
31 |
+
[submodule "gold-price-5-years"]
|
32 |
+
path = gold-price-5-years
|
33 |
+
url = https://huggingface.co/datasets/aaronjpi/gold-price-5-years
|
gold-price-5-years
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Subproject commit cfd13924ca7413b66555b7d34cbf18be4b648921
|
import csv.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import csv
|
2 |
+
import json
|
3 |
+
|
4 |
+
# Update file paths
|
5 |
+
csv_file_path = "/Users/aaronpinto/Downloads/HistoricalData_1731642761305.csv" # Adjusted to match the terminal output
|
6 |
+
json_file_path = "/Users/aaronpinto/Downloads/HistoricalData_1731642761305.jsonl"
|
7 |
+
|
8 |
+
# Read the CSV and write to JSONL
|
9 |
+
with open(csv_file_path, mode='r', encoding='utf-8') as csv_file, open(json_file_path, mode='w', encoding='utf-8') as jsonl_file:
|
10 |
+
csv_reader = csv.DictReader(csv_file)
|
11 |
+
|
12 |
+
for row in csv_reader:
|
13 |
+
json.dump(row, jsonl_file)
|
14 |
+
jsonl_file.write('\n') # Newline after each JSON object
|
15 |
+
|
16 |
+
print(f"Conversion complete! JSONL file saved to {json_file_path}")
|