Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
swc-bb
S
swc-templates
S
swc-lessons
Software Publishing
Astronaut Analysis
Commits
7cd531bb
Commit
7cd531bb
authored
Feb 12, 2020
by
Tobias Schlauch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put input data file into a separate directory
parent
1a176093
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
1 deletion
+1
-1
data/astronauts.json
data/astronauts.json
+0
-0
main.py
main.py
+1
-1
No files found.
astronauts.json
→
data/
astronauts.json
View file @
7cd531bb
File moved
main.py
View file @
7cd531bb
...
...
@@ -20,7 +20,7 @@ def died_with_age(row):
return
today
.
year
-
born
.
year
-
((
today
.
month
,
today
.
day
)
<
(
born
.
month
,
born
.
day
))
plt
.
style
.
use
(
"ggplot"
)
df
=
pd
.
read_json
(
"astronauts.json"
)
df
=
pd
.
read_json
(
"
data/
astronauts.json"
)
df
=
df
.
rename
(
index
=
str
,
columns
=
{
"astronaut"
:
"astronaut_id"
,
"astronautLabel"
:
"name"
,
"birthplaceLabel"
:
"birthplace"
,
"sex_or_genderLabel"
:
"sex_or_gender"
})
df
=
df
.
set_index
(
"astronaut_id"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment