Commit 52767e1
committed
mimic-iv/buildmimic/sqlite/import.py: replace
`strip()` removes any of the given characters from both the start and
end of a string: https://docs.python.org/3/library/stdtypes.html#str.strip
For a filename "chartevents.csv.gz" the resulting tablename currently is
"hartevent" where it should be "chartevents".
'chartevents'.strip('.gz').strip('.csv').lower()
Instead, strip the suffixes manually to derive the tablename from the
filename.
Later, we could use `removesuffix()`, which is available from Python 3.9
onwards: https://docs.python.org/3/library/stdtypes.html#str.removesuffixstrip()
1 parent 14b9f5f commit 52767e1
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
0 commit comments