Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
HOTMapper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
HOTMapper
HOTMapper
Commits
36d29c51
Commit
36d29c51
authored
5 years ago
by
jvfpw18
Browse files
Options
Downloads
Plain Diff
Merge branch 'development' of gitlab.c3sl.ufpr.br:tools/hotmapper into development
parents
228c3e44
93280f13
No related branches found
Branches containing commit
No related tags found
1 merge request
!13
v1.1.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
database/actions.py
+3
-2
3 additions, 2 deletions
database/actions.py
with
3 additions
and
2 deletions
database/actions.py
+
3
−
2
View file @
36d29c51
...
...
@@ -28,6 +28,7 @@ from database.database_table import gen_data_table, copy_tabbed_to_csv
import
database.groups
import
settings
from
database.groups
import
DATA_GROUP
,
DATABASE_TABLE_NAME
import
pandas
as
pd
ENGINE
=
create_engine
(
settings
.
DATABASE_URI
,
echo
=
settings
.
ECHO
)
META
=
MetaData
(
bind
=
ENGINE
)
...
...
@@ -44,8 +45,8 @@ sqlalchemy_logger.setLevel(settings.LOGGING_LEVEL)
def
temporary_data
(
connection
,
file_name
,
table
,
year
,
offset
=
2
,
delimiters
=
[
'
;
'
,
'
\\
n
'
,
'"'
],
null
=
''
):
header
=
open
(
file_name
,
encoding
=
"
ISO-8859-9
"
).
readline
().
strip
(
)
header
=
header
.
split
(
delimiters
[
0
])
header
=
pd
.
read_csv
(
file_name
,
encoding
=
"
ISO-8859-9
"
,
sep
=
delimiters
[
0
]
)
header
=
[
h
.
strip
()
for
h
in
header
.
columns
.
values
]
ttable
=
table
.
get_temporary
(
header
,
year
)
ttable
.
create
(
bind
=
connection
)
...
...
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