Skip to content

Commit 7fd6e15

Browse files
committed
More fixes.
1 parent 943e885 commit 7fd6e15

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

addendum/mongo-utils/csv_to_mongo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ def to_date(d: str) -> datetime | None:
4444
func_to_cols: list[Callable[[str], str|int|float|datetime|None]] = \
4545
list(map(lambda c: to_date if 'date' in c.lower() else to_numeric, columns))
4646

47-
coll.insert_many([{c: v for (c,v) in zip(columns,
48-
[func(e) for (func,e) in zip(func_to_cols, row)])}
47+
coll.insert_many([dict(zip(columns,
48+
[func(e) for (func,e) in zip(func_to_cols, row)]))
4949
for row in reader])

mongo/sesion3.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
},
140140
"outputs": [],
141141
"source": [
142-
"client: MongoClient = MongoClient(db_hostname, 27017, compressors='zstd')\n",
142+
"client: MongoClient = MongoClient(db_hostname, 27017, compressors='zstd,zlib')\n",
143143
"client"
144144
]
145145
},

0 commit comments

Comments
 (0)