Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
kis_tools
Manage
Activity
Members
Labels
Plan
Issues
35
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sdc
kis_tools
Commits
73c0747e
Commit
73c0747e
authored
4 years ago
by
Carl Schaffer
Browse files
Options
Downloads
Patches
Plain Diff
switching to db instead of csv
parent
1eed8a6b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!165
Coord study
,
!163
ci fix, utils for coord study
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kis_tools/gris/gris_coordinate_study/pull_coords.py
+7
-2
7 additions, 2 deletions
kis_tools/gris/gris_coordinate_study/pull_coords.py
with
7 additions
and
2 deletions
kis_tools/gris/gris_coordinate_study/pull_coords.py
+
7
−
2
View file @
73c0747e
...
...
@@ -14,10 +14,15 @@ pos = pos_from_filename(fn)
run
=
gris_run_number
(
fn
)
date
=
date_from_fn
(
fn
)
outfile
=
Path
(
__file__
).
parent
/
'
gris_
l0_
coords.
csv
'
outfile
=
Path
(
__file__
).
parent
/
'
gris_coords.
db
'
df
=
pd
.
DataFrame
()
ser
=
pd
.
Series
(
pos
)
df
[
f
'
gris_
{
date
.
strftime
(
"
%Y%m%d
"
)
}
_
{
run
:
03
d
}
'
]
=
ser
df
=
df
.
T
df
.
index
.
name
=
'
obs_name
'
df
.
to_csv
(
outfile
,
mode
=
'
a
'
,
header
=
(
not
outfile
.
exists
()))
from
sqlalchemy
import
create_engine
db_name
=
'
sqlite:///
'
+
str
(
outfile
)
engine
=
create_engine
(
str
(
db_name
))
df
.
to_sql
(
'
raw_from_l0
'
,
con
=
engine
,
if_exists
=
'
append
'
,
index_label
=
'
obs_name
'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment