Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
datacirco-prepare-data
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leximpact
DataCirco
datacirco-prepare-data
Commits
b8a6f6d5
Commit
b8a6f6d5
authored
4 months ago
by
Benoît Courty
Browse files
Options
Downloads
Patches
Plain Diff
BASE_TD_FILO_IRIS_2021_DISP.csv
parent
22ede485
No related branches found
No related tags found
1 merge request
!54
Mise à jour de DataCirco
Pipeline
#20080
passed
4 months ago
Stage: init
Stage: download
Stage: populate_db
Stage: export_json
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
populate_db/revenus.py
+3
-3
3 additions, 3 deletions
populate_db/revenus.py
with
3 additions
and
3 deletions
populate_db/revenus.py
+
3
−
3
View file @
b8a6f6d5
...
...
@@ -80,9 +80,9 @@ df.columns = header
df
.
to_sql
(
"
insee_revenu_pauvrete_2020
"
,
con
=
engine
,
if_exists
=
"
append
"
,
index
=
False
)
print
(
"
\t
2021...
"
)
utilitaires
.
unzip_file
(
"
BASE_TD_FILO_
DISP_
IRIS_2021_CSV.zip
"
)
utilitaires
.
unzip_file
(
"
BASE_TD_FILO_IRIS_2021_
DISP_
CSV.zip
"
)
fields
,
header
=
utilitaires
.
get_fields
(
"
BASE_TD_FILO_
DISP_
IRIS_2021.csv
"
,
delimiter
=
"
;
"
"
BASE_TD_FILO_IRIS_2021
_DISP
.csv
"
,
delimiter
=
"
;
"
)
run
(
f
"""
...
...
@@ -90,7 +90,7 @@ run(
CREATE TABLE IF NOT EXISTS insee_revenu_pauvrete_2021 (
{
fields
}
);
"""
)
df
=
pd
.
read_csv
(
"
BASE_TD_FILO_
DISP_
IRIS_2021.csv
"
,
sep
=
"
;
"
)
df
=
pd
.
read_csv
(
"
BASE_TD_FILO_IRIS_2021
_DISP
.csv
"
,
sep
=
"
;
"
)
df
.
columns
=
header
df
.
to_sql
(
"
insee_revenu_pauvrete_2021
"
,
con
=
engine
,
if_exists
=
"
append
"
,
index
=
False
)
...
...
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