File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Original file line number Diff line number Diff line change @@ -23,14 +23,23 @@ Anecdotally, we use this to load approximately 640 million rows of data from a 7
23
23
24
24
``` python3
25
25
26
- from pandas_to_postgres import ...
26
+ from pandas_to_postgres import (
27
+ DataFrameCopy,
28
+ hdf_to_postgres,
29
+ multiprocess_hdf_to_postgres,
30
+ )
27
31
28
- # already loaded dataframe
29
- ...
32
+ table_model = db.metadata.tables[' my_awesome_table' ]
33
+
34
+ # already loaded DataFrame & SQLAlchemy Table model
35
+ with db.engine.connect() as c:
36
+ DataFrameCopy(df, conn = c, table_obj = table_model).copy()
30
37
31
38
# HDF from file
32
- ...
39
+ hdf_to_postgres( ' ./data.h5 ' , db)
33
40
41
+ # Parallel HDF from file
42
+ multiprocess_hdf_to_postgres(' ./data.h5' , db, processes = 4 )
34
43
```
35
44
36
45
# Other Comparisons
You can’t perform that action at this time.
0 commit comments