Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
democrasci_preprocWP1
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container 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
Marta Balode
democrasci_preprocWP1
Commits
9572f7d1
Commit
9572f7d1
authored
6 years ago
by
Lili Gasser
Browse files
Options
Downloads
Patches
Plain Diff
add CantonAbbreviation to MPs additional Info
parent
97fffeb8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
data/politicians/MPs_additionalInfo.csv
+48
-34
48 additions, 34 deletions
data/politicians/MPs_additionalInfo.csv
src/python/extractMPs.py
+1
-1
1 addition, 1 deletion
src/python/extractMPs.py
with
49 additions
and
35 deletions
data/politicians/MPs_additionalInfo.csv
+
48
−
34
View file @
9572f7d1
LastName,FirstName,DoubleName,Additional
Cramer,Konrad H.,Cramer-Frey,Frey
Blumer,Johannes,Blumer-Egloff,Egloff
Jordan,Adolphe,Jordan-Martin,Martin
Schmid,Jakob,Schmid-Ronca,Ronca
Sulzer,Eduard,Sulzer-Ziegler,Ziegler
Eugster,Howard,Eugster-Züst,Züst
Bratschi,Peter,,Matten
Jenny,Johann,,Worblaufen
Seiler,Hermann,,Zermatt
Steiner,Ferdinand,,Malters
Naine,Charles-Théophile,,Préverenges
Fischer,Hanspeter,,Weinfelden
Hofer,Walther,,Flawil
Weber,Rolf,,Arbon
Zweifel,Esaja,,Landammann
Zweifel,Peter,,Regierungsrath
Bühler,Peter Theophil,,Bünden
Welti,Franz,,Basel
Schmid,Arthur,,Oberentfelden
Schmid,Jacques,,Olten
Müller,Alfred,,Amriswil
Müller,Hans Gottfried,,Aarberg
Müller,Alban,,Olten
Perrin,Tell,,Chaux
Perrin,Paul,,Corcelles
Schmid-Ruedin,Philipp,,Philip
Studer,Ernst,,Burgdorf
Meier,Christian,,Netstal
Kunz,Alois,,Hergiswil
Cottier,Henry,,Lausanne
Bringolf,Walther,,Schaff
Bringolf,Richard,,Peilz
Roth,August,,Frauenfeld
LastName,FirstName,CantonAbbreviation,Additional
Cramer,Konrad H.,ZH,Frey
Blumer,Johannes,SG,Egloff
Jordan,Adolphe,VD,Martin
Schmid,Jakob,LU,Ronca
Sulzer,Eduard,ZH,Ziegler
Eugster,Howard,AR,Züst
Bratschi,Peter,BE,Matten
Jenny,Johann,BE,Worblaufen
Seiler,Hermann,VS,Zermatt
Steiner,Ferdinand,LU,Malters
Naine,Charles-Théophile,VD,Préverenges
Naine,Charles-Théophile,NE,Préverenges
Fischer,Hanspeter,TG,Weinfelden
Hofer,Walther,BE,Flawil
Weber,Rolf,TG,Arbon
Zweifel,Esaja,GL,Landammann
Zweifel,Peter,GL,Regierungsrath
Bühler,Peter Theophil,GR,Bünden
Welti,Franz,BS,Basel
Schmid,Arthur,AG,Oberentfelden
Schmid,Jacques,SO,Olten
Müller,Alfred,TG,Amriswil
Müller,Hans Gottfried,BE,Aarberg
Müller,Alban,SO,Olten
Perrin,Tell,NE,Chaux
Perrin,Paul,VD,Corcelles
Schmid-Ruedin,Philipp,ZH,Philip
Studer,Ernst,BE,Burgdorf
Meier,Christian,GL,Netstal
Kunz,Alois,LU,Hergiswil
Cottier,Henry,VD,Lausanne
Bringolf,Walther,SH,Schaff
Bringolf,Richard,VD,Peilz
Roth,August,TG,Frauenfeld
Bossi,Bixio,TI,Lugano
Bossi,Johann,GR,Chur,GR
Müller,Hans,BE,Grosshöchstetten
Roth,Hans,BE,Interlaken
Bühler,Rolf Theodor,SG,Uzwil
Pfister,Bruno,SG,Gallen
Roth,August,TG,Arbon
Rusca,Giovan-Battista,TI,Locarno
Moser,Arthur,SH,Schaff
Weber,Jakob Rudolf,BE,Grasswil
Weber,Heinrich Otto,SG,Gallen
Sigg,Jean-C.,GE,Genève
Suter,Johannes,BL,Baselland
This diff is collapsed.
Click to expand it.
src/python/extractMPs.py
+
1
−
1
View file @
9572f7d1
...
...
@@ -186,7 +186,7 @@ class MPs_Extractor(object):
# some people need additional information such as a place or a second last name to be uniquely identified
df_addInfo
=
pd
.
read_csv
(
self
.
input_file_addInfo
)
for
row
in
df_addInfo
.
itertuples
(
index
=
False
,
name
=
'
Pandas
'
):
_df_after1890
.
loc
[(
_df_after1890
[
'
LastName
'
]
==
row
[
0
])
&
(
_df_after1890
[
'
FirstName
'
]
==
row
[
1
]),
'
additionalInfo
'
]
=
row
[
3
]
_df_after1890
.
loc
[(
_df_after1890
[
'
LastName
'
]
==
row
[
0
])
&
(
_df_after1890
[
'
FirstName
'
]
==
row
[
1
])
&
(
_df_after1890
[
'
CantonAbbreviation
'
]
==
row
[
2
])
,
'
additionalInfo
'
]
=
row
[
3
]
# write dataframe to csv
_df_after1890
.
to_csv
(
self
.
output_file_csv
)
...
...
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