Soumik Bose commited on
Commit ·
03993cf
1
Parent(s): c0fce26
50 --> 5
Browse files
extract_csv_metadata_service.py
CHANGED
|
@@ -26,7 +26,7 @@ def extract_csv_metadata_logic(csv_url: str) -> List[Dict[str, Any]]:
|
|
| 26 |
# Load a sample of the CSV to infer types (first 50 rows is usually enough)
|
| 27 |
# Using on_bad_lines='skip' to be robust against malformed rows
|
| 28 |
# storage_options={'User-Agent': ...} can be added if requests are blocked
|
| 29 |
-
df = pd.read_csv(csv_url, nrows=
|
| 30 |
|
| 31 |
fields = []
|
| 32 |
|
|
|
|
| 26 |
# Load a sample of the CSV to infer types (first 50 rows is usually enough)
|
| 27 |
# Using on_bad_lines='skip' to be robust against malformed rows
|
| 28 |
# storage_options={'User-Agent': ...} can be added if requests are blocked
|
| 29 |
+
df = pd.read_csv(csv_url, nrows=5, on_bad_lines='skip')
|
| 30 |
|
| 31 |
fields = []
|
| 32 |
|